mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
eth/downloader: progress in stateSync not used anymore
This commit is contained in:
parent
54f650a3be
commit
d6170bfa53
1 changed files with 3 additions and 6 deletions
|
|
@ -399,7 +399,7 @@ func (s *stateSync) fillTasks(n int, req *stateReq) {
|
||||||
// into a running state sync, re-queuing any items that were requested but not
|
// into a running state sync, re-queuing any items that were requested but not
|
||||||
// delivered.
|
// delivered.
|
||||||
func (s *stateSync) process(req *stateReq) error {
|
func (s *stateSync) process(req *stateReq) error {
|
||||||
// Collect processing stats and update progress if valid data was received
|
// Collect processing stats
|
||||||
duplicate, unexpected := 0, 0
|
duplicate, unexpected := 0, 0
|
||||||
|
|
||||||
defer func(start time.Time) {
|
defer func(start time.Time) {
|
||||||
|
|
@ -409,15 +409,12 @@ func (s *stateSync) process(req *stateReq) error {
|
||||||
}(time.Now())
|
}(time.Now())
|
||||||
|
|
||||||
// Iterate over all the delivered data and inject one-by-one into the trie
|
// Iterate over all the delivered data and inject one-by-one into the trie
|
||||||
progress := false
|
|
||||||
|
|
||||||
for _, blob := range req.response {
|
for _, blob := range req.response {
|
||||||
prog, hash, err := s.processNodeData(blob)
|
_, hash, err := s.processNodeData(blob)
|
||||||
switch err {
|
switch err {
|
||||||
case nil:
|
case nil:
|
||||||
s.numUncommitted++
|
s.numUncommitted++
|
||||||
s.bytesUncommitted += len(blob)
|
s.bytesUncommitted += len(blob)
|
||||||
progress = progress || prog
|
|
||||||
case trie.ErrNotRequested:
|
case trie.ErrNotRequested:
|
||||||
unexpected++
|
unexpected++
|
||||||
case trie.ErrAlreadyProcessed:
|
case trie.ErrAlreadyProcessed:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue