Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions ctxc/downloader/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,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()
Expand All @@ -518,7 +518,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
}
Expand All @@ -540,7 +539,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
}
Expand Down