aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-07 23:41:05 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-08 18:23:58 +0800
commit2d627995cf22b9a1187e4b22d430f84541904d2c (patch)
tree5aeaf0a145e107de30cdb77c914093071ee59cca /eth
parentb40c796ff726d54efc8c7933e1586869c2a0985a (diff)
downloaddexon-2d627995cf22b9a1187e4b22d430f84541904d2c.tar
dexon-2d627995cf22b9a1187e4b22d430f84541904d2c.tar.gz
dexon-2d627995cf22b9a1187e4b22d430f84541904d2c.tar.bz2
dexon-2d627995cf22b9a1187e4b22d430f84541904d2c.tar.lz
dexon-2d627995cf22b9a1187e4b22d430f84541904d2c.tar.xz
dexon-2d627995cf22b9a1187e4b22d430f84541904d2c.tar.zst
dexon-2d627995cf22b9a1187e4b22d430f84541904d2c.zip
eth/downloader: fix another rebase error
Diffstat (limited to 'eth')
-rw-r--r--eth/downloader/queue.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go
index 79ddbb857..3c99efb81 100644
--- a/eth/downloader/queue.go
+++ b/eth/downloader/queue.go
@@ -230,8 +230,7 @@ func (q *queue) Reserve(p *peer, count int) *fetchRequest {
send := make(map[common.Hash]int)
skip := make(map[common.Hash]int)
- capacity := p.Capacity()
- for proc := 0; proc < space && len(send) < capacity && !q.hashQueue.Empty(); proc++ {
+ for proc := 0; proc < space && len(send) < count && !q.hashQueue.Empty(); proc++ {
hash, priority := q.hashQueue.Pop()
if p.ignored.Has(hash) {
skip[hash.(common.Hash)] = int(priority)