diff options
author | williambannas <wrschwartz@wpi.edu> | 2018-06-14 18:14:52 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-06-14 18:14:52 +0800 |
commit | 9402f965977620de0dcd968ad6943f66a80bcc5d (patch) | |
tree | b3c6fc4a3aed4299117ff1e0aa83a84eff17cc70 /eth/downloader/queue.go | |
parent | d0fd8d6fc29ec859650adf30718e2b06786e854f (diff) | |
download | go-tangerine-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.gz go-tangerine-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.zst go-tangerine-9402f965977620de0dcd968ad6943f66a80bcc5d.zip |
eth: conform better to the golint standards (#16783)
* eth: made changes to conform better to the golint standards
* eth: fix comment nit
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) } } |