mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
Merge pull request #720 from gzliudan/fix-s1033
eth/downloader: fix staticcheck warning S1033: unnecessary guard around call to delete
This commit is contained in:
commit
cea75c625a
1 changed files with 1 additions and 3 deletions
|
|
@ -419,10 +419,8 @@ func (s *stateSync) process(req *stateReq) error {
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("invalid state node %s: %v", hash.TerminalString(), err)
|
return fmt.Errorf("invalid state node %s: %v", hash.TerminalString(), err)
|
||||||
}
|
}
|
||||||
if _, ok := req.tasks[hash]; ok {
|
|
||||||
delete(req.tasks, hash)
|
delete(req.tasks, hash)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Put unfulfilled tasks back into the retry queue
|
// Put unfulfilled tasks back into the retry queue
|
||||||
npeers := s.d.peers.Len()
|
npeers := s.d.peers.Len()
|
||||||
for hash, task := range req.tasks {
|
for hash, task := range req.tasks {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue