From 03b8cc8eb9ec5a3e80d9a794aee61223b4b43895 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Thu, 24 Apr 2025 15:34:49 +0800 Subject: [PATCH] remove unecessary check --- eth/downloader/resultstore.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eth/downloader/resultstore.go b/eth/downloader/resultstore.go index f9bad24811..0bb0cf9df3 100644 --- a/eth/downloader/resultstore.go +++ b/eth/downloader/resultstore.go @@ -50,8 +50,6 @@ type resultStore struct { // pendingGasUsed tracks the current total gas used of all in-flight bodies pendingGasUsed uint64 - targetGasScheduled uint64 - lock sync.RWMutex } @@ -112,9 +110,6 @@ func (r *resultStore) AddFetch(header *types.Header, snapSync bool) (stale, thro return stale, throttled, item, err } if item == nil { - if header.GasUsed+r.pendingGasUsed > r.targetGasScheduled { - return false, true, nil, nil - } item = newFetchResult(header, snapSync) r.items[index] = item r.pendingCount++