Skip to content

Commit b3b46ce

Browse files
authored
eth/downloader: remove dead proc counter (#33309)
1 parent 795a7ab commit b3b46ce

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

eth/downloader/queue.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
418418
skip := make([]*types.Header, 0)
419419
progress := false
420420
throttled := false
421-
for proc := 0; len(send) < count && !taskQueue.Empty(); proc++ {
421+
for len(send) < count && !taskQueue.Empty() {
422422
// the task queue will pop items in order, so the highest prio block
423423
// is also the lowest block number.
424424
header, _ := taskQueue.Peek()
@@ -433,7 +433,6 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
433433
taskQueue.PopItem()
434434
progress = true
435435
delete(taskPool, header.Hash())
436-
proc = proc - 1
437436
log.Error("Fetch reservation already delivered", "number", header.Number.Uint64())
438437
continue
439438
}
@@ -455,7 +454,6 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
455454
// If it's a noop, we can skip this task
456455
delete(taskPool, header.Hash())
457456
taskQueue.PopItem()
458-
proc = proc - 1
459457
progress = true
460458
continue
461459
}

0 commit comments

Comments
 (0)