diff options
author | Felix Lange <fjl@twurst.com> | 2016-02-26 22:24:51 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-02-29 20:24:33 +0800 |
commit | a4f4846fff688011f42274447cf4ea3c2428c2fc (patch) | |
tree | 425dfbf5c6dcb05afe3930c5e098cd8522fd6729 | |
parent | 7f83e68b13d573a532dd907a7ff2252241de36e4 (diff) | |
download | go-tangerine-a4f4846fff688011f42274447cf4ea3c2428c2fc.tar go-tangerine-a4f4846fff688011f42274447cf4ea3c2428c2fc.tar.gz go-tangerine-a4f4846fff688011f42274447cf4ea3c2428c2fc.tar.bz2 go-tangerine-a4f4846fff688011f42274447cf4ea3c2428c2fc.tar.lz go-tangerine-a4f4846fff688011f42274447cf4ea3c2428c2fc.tar.xz go-tangerine-a4f4846fff688011f42274447cf4ea3c2428c2fc.tar.zst go-tangerine-a4f4846fff688011f42274447cf4ea3c2428c2fc.zip |
[release/1.3.4] eth/downloader: fix header download limiting
Fixes #2201
(cherry picked from commit 26e72b2ccd728b00e08bd692bdd7241ff0bfe2cc)
-rw-r--r-- | eth/downloader/downloader.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 163994730..1f16845e1 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1216,7 +1216,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) |