mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-16 21:16:37 +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)
|
skip := make([]*types.Header, 0)
|
||||||
progress := false
|
progress := false
|
||||||
throttled := 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
|
// the task queue will pop items in order, so the highest prio block
|
||||||
// is also the lowest block number.
|
// is also the lowest block number.
|
||||||
header, _ := taskQueue.Peek()
|
header, _ := taskQueue.Peek()
|
||||||
|
|
@ -433,7 +433,6 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
|
||||||
taskQueue.PopItem()
|
taskQueue.PopItem()
|
||||||
progress = true
|
progress = true
|
||||||
delete(taskPool, header.Hash())
|
delete(taskPool, header.Hash())
|
||||||
proc = proc - 1
|
|
||||||
log.Error("Fetch reservation already delivered", "number", header.Number.Uint64())
|
log.Error("Fetch reservation already delivered", "number", header.Number.Uint64())
|
||||||
continue
|
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
|
// If it's a noop, we can skip this task
|
||||||
delete(taskPool, header.Hash())
|
delete(taskPool, header.Hash())
|
||||||
taskQueue.PopItem()
|
taskQueue.PopItem()
|
||||||
proc = proc - 1
|
|
||||||
progress = true
|
progress = true
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue