diff options
Diffstat (limited to 'eth/downloader/queue.go')
-rw-r--r-- | eth/downloader/queue.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index bbe0aed5d..984dd13d6 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -596,21 +596,21 @@ func (q *queue) cancel(request *fetchRequest, taskQueue *prque.Prque, pendPool m // Revoke cancels all pending requests belonging to a given peer. This method is // meant to be called during a peer drop to quickly reassign owned data fetches // to remaining nodes. -func (q *queue) Revoke(peerId string) { +func (q *queue) Revoke(peerID string) { q.lock.Lock() defer q.lock.Unlock() - if request, ok := q.blockPendPool[peerId]; ok { + if request, ok := q.blockPendPool[peerID]; ok { for _, header := range request.Headers { q.blockTaskQueue.Push(header, -float32(header.Number.Uint64())) } - delete(q.blockPendPool, peerId) + delete(q.blockPendPool, peerID) } - if request, ok := q.receiptPendPool[peerId]; ok { + if request, ok := q.receiptPendPool[peerID]; ok { for _, header := range request.Headers { q.receiptTaskQueue.Push(header, -float32(header.Number.Uint64())) } - delete(q.receiptPendPool, peerId) + delete(q.receiptPendPool, peerID) } } |