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
|
||||
// delivered.
|
||||
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
|
||||
|
||||
defer func(start time.Time) {
|
||||
|
|
@ -409,15 +409,12 @@ func (s *stateSync) process(req *stateReq) error {
|
|||
}(time.Now())
|
||||
|
||||
// Iterate over all the delivered data and inject one-by-one into the trie
|
||||
progress := false
|
||||
|
||||
for _, blob := range req.response {
|
||||
prog, hash, err := s.processNodeData(blob)
|
||||
_, hash, err := s.processNodeData(blob)
|
||||
switch err {
|
||||
case nil:
|
||||
s.numUncommitted++
|
||||
s.bytesUncommitted += len(blob)
|
||||
progress = progress || prog
|
||||
case trie.ErrNotRequested:
|
||||
unexpected++
|
||||
case trie.ErrAlreadyProcessed:
|
||||
|
|
|
|||
Loading…
Reference in a new issue