From 8d3dc3552090c7ace6734e4e8944cf94230a3f69 Mon Sep 17 00:00:00 2001 From: ucwong Date: Fri, 28 Nov 2025 18:11:32 +0800 Subject: [PATCH] remove dead proc counter --- ctxc/downloader/queue.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ctxc/downloader/queue.go b/ctxc/downloader/queue.go index 9415230993..117e8de7c9 100644 --- a/ctxc/downloader/queue.go +++ b/ctxc/downloader/queue.go @@ -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() @@ -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 } @@ -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 }