mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
eth/downloader: remove dead proc counter (#33309)
This commit is contained in:
parent
795a7ab58a
commit
b3b46ce435
1 changed files with 1 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue