aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-02-26 23:02:28 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-02-26 23:02:28 +0800
commit85865a51b63cdbeaabb76a3729f9b8361a2616d7 (patch)
tree04dc59bbadbc9541ec994a367aaf6ff6b149454e
parenta6903ad6a5b2cd8bb02ad85a9a612b575baf8362 (diff)
parent26e72b2ccd728b00e08bd692bdd7241ff0bfe2cc (diff)
downloaddexon-85865a51b63cdbeaabb76a3729f9b8361a2616d7.tar
dexon-85865a51b63cdbeaabb76a3729f9b8361a2616d7.tar.gz
dexon-85865a51b63cdbeaabb76a3729f9b8361a2616d7.tar.bz2
dexon-85865a51b63cdbeaabb76a3729f9b8361a2616d7.tar.lz
dexon-85865a51b63cdbeaabb76a3729f9b8361a2616d7.tar.xz
dexon-85865a51b63cdbeaabb76a3729f9b8361a2616d7.tar.zst
dexon-85865a51b63cdbeaabb76a3729f9b8361a2616d7.zip
Merge pull request #2265 from fjl/downloader-mem
eth/downloader: fix header download limiting
-rw-r--r--eth/downloader/downloader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index de54bd859..017d25704 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -1249,7 +1249,7 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error {
}
}
// Notify the content fetchers of new headers, but stop if queue is full
- cont := d.queue.PendingBlocks() < maxQueuedHeaders || d.queue.PendingReceipts() < maxQueuedHeaders
+ cont := d.queue.PendingBlocks() < maxQueuedHeaders && d.queue.PendingReceipts() < maxQueuedHeaders
for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh, d.stateWakeCh} {
if cont {
// We still have headers to fetch, send continuation wake signal (potential)