remove unecessary check

This commit is contained in:
Jared Wasinger 2025-04-24 15:34:49 +08:00
parent 52221ae8cf
commit 03b8cc8eb9

View file

@ -50,8 +50,6 @@ type resultStore struct {
// pendingGasUsed tracks the current total gas used of all in-flight bodies // pendingGasUsed tracks the current total gas used of all in-flight bodies
pendingGasUsed uint64 pendingGasUsed uint64
targetGasScheduled uint64
lock sync.RWMutex lock sync.RWMutex
} }
@ -112,9 +110,6 @@ func (r *resultStore) AddFetch(header *types.Header, snapSync bool) (stale, thro
return stale, throttled, item, err return stale, throttled, item, err
} }
if item == nil { if item == nil {
if header.GasUsed+r.pendingGasUsed > r.targetGasScheduled {
return false, true, nil, nil
}
item = newFetchResult(header, snapSync) item = newFetchResult(header, snapSync)
r.items[index] = item r.items[index] = item
r.pendingCount++ r.pendingCount++