mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
trie: enforce strict per-depth fetch limit in Missing
This commit is contained in:
parent
5e6f7374de
commit
f1f26be566
1 changed files with 1 additions and 1 deletions
|
|
@ -368,7 +368,7 @@ func (s *Sync) Missing(max int) ([]string, []common.Hash, []common.Hash) {
|
||||||
|
|
||||||
// If we have too many already-pending tasks for this depth, throttle
|
// If we have too many already-pending tasks for this depth, throttle
|
||||||
depth := int(prio >> 56)
|
depth := int(prio >> 56)
|
||||||
if s.fetches[depth] > maxFetchesPerDepth {
|
if s.fetches[depth] >= maxFetchesPerDepth {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// Item is allowed to be scheduled, add it to the task list
|
// Item is allowed to be scheduled, add it to the task list
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue