Skip to content

Commit

Permalink
trie: fix 'gosimple' lint issue (ethereum#25309)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored and jagdeep sidhu committed Jul 19, 2022
1 parent fc107a5 commit b0b1b98
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions trie/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,16 @@ func (s *Sync) Missing(max int) ([]string, []common.Hash, []common.Hash) {
s.queue.Pop()
s.fetches[depth]++

switch item.(type) {
switch item := item.(type) {
case common.Hash:
codeHashes = append(codeHashes, item.(common.Hash))
codeHashes = append(codeHashes, item)
case string:
path := item.(string)
req, ok := s.nodeReqs[path]
req, ok := s.nodeReqs[item]
if !ok {
log.Error("Missing node request", "path", path)
log.Error("Missing node request", "path", item)
continue // System very wrong, shouldn't happen
}
nodePaths = append(nodePaths, path)
nodePaths = append(nodePaths, item)
nodeHashes = append(nodeHashes, req.hash)
}
}
Expand Down

0 comments on commit b0b1b98

Please sign in to comment.