[release/1.3.4] eth/downloader: fix header download limiting

Fixes #2201
(cherry picked from commit 26e72b2ccd)
pull/2258/head
Felix Lange 9 years ago committed by Jeffrey Wilcke
parent 7f83e68b13
commit a4f4846fff
  1. 2
      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 // 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} { for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh, d.stateWakeCh} {
if cont { if cont {
// We still have headers to fetch, send continuation wake signal (potential) // We still have headers to fetch, send continuation wake signal (potential)

Loading…
Cancel
Save