mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
parent
152e3d9923
commit
67106daaa8
1 changed files with 5 additions and 6 deletions
11
trie/sync.go
11
trie/sync.go
|
|
@ -250,17 +250,16 @@ func (s *Sync) Missing(max int) ([]string, []common.Hash, []common.Hash) {
|
||||||
s.queue.Pop()
|
s.queue.Pop()
|
||||||
s.fetches[depth]++
|
s.fetches[depth]++
|
||||||
|
|
||||||
switch item.(type) {
|
switch item := item.(type) {
|
||||||
case common.Hash:
|
case common.Hash:
|
||||||
codeHashes = append(codeHashes, item.(common.Hash))
|
codeHashes = append(codeHashes, item)
|
||||||
case string:
|
case string:
|
||||||
path := item.(string)
|
req, ok := s.nodeReqs[item]
|
||||||
req, ok := s.nodeReqs[path]
|
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Error("Missing node request", "path", path)
|
log.Error("Missing node request", "path", item)
|
||||||
continue // System very wrong, shouldn't happen
|
continue // System very wrong, shouldn't happen
|
||||||
}
|
}
|
||||||
nodePaths = append(nodePaths, path)
|
nodePaths = append(nodePaths, item)
|
||||||
nodeHashes = append(nodeHashes, req.hash)
|
nodeHashes = append(nodeHashes, req.hash)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue