eth/downloader: remove dead proc counter (#33309)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

This commit is contained in:
ANtutov 2025-11-28 04:42:22 +02:00 committed by GitHub
parent 795a7ab58a
commit b3b46ce435
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -418,7 +418,7 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
skip := make([]*types.Header, 0)
progress := false
throttled := false
for proc := 0; len(send) < count && !taskQueue.Empty(); proc++ {
for len(send) < count && !taskQueue.Empty() {
// the task queue will pop items in order, so the highest prio block
// is also the lowest block number.
header, _ := taskQueue.Peek()
@ -433,7 +433,6 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
taskQueue.PopItem()
progress = true
delete(taskPool, header.Hash())
proc = proc - 1
log.Error("Fetch reservation already delivered", "number", header.Number.Uint64())
continue
}
@ -455,7 +454,6 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
// If it's a noop, we can skip this task
delete(taskPool, header.Hash())
taskQueue.PopItem()
proc = proc - 1
progress = true
continue
}