From f1f26be56670b556e6f3852326d674030894c4ef Mon Sep 17 00:00:00 2001 From: Forostovec Date: Sat, 15 Nov 2025 21:56:08 +0200 Subject: [PATCH] trie: enforce strict per-depth fetch limit in Missing --- trie/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/sync.go b/trie/sync.go index 404d67f154..1aaccf7643 100644 --- a/trie/sync.go +++ b/trie/sync.go @@ -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 depth := int(prio >> 56) - if s.fetches[depth] > maxFetchesPerDepth { + if s.fetches[depth] >= maxFetchesPerDepth { break } // Item is allowed to be scheduled, add it to the task list