aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-02-29 20:22:28 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-02-29 20:44:34 +0800
commit2be28427584cfd4f4903693d27dcf748bd62ed0d (patch)
tree88b891fa70fdd381c0a61b306ae3ae54a8fe10b3 /eth
parentc2df9d356aa770984a3c59dd73349b410d7871e5 (diff)
downloadgo-tangerine-2be28427584cfd4f4903693d27dcf748bd62ed0d.tar
go-tangerine-2be28427584cfd4f4903693d27dcf748bd62ed0d.tar.gz
go-tangerine-2be28427584cfd4f4903693d27dcf748bd62ed0d.tar.bz2
go-tangerine-2be28427584cfd4f4903693d27dcf748bd62ed0d.tar.lz
go-tangerine-2be28427584cfd4f4903693d27dcf748bd62ed0d.tar.xz
go-tangerine-2be28427584cfd4f4903693d27dcf748bd62ed0d.tar.zst
go-tangerine-2be28427584cfd4f4903693d27dcf748bd62ed0d.zip
[release/1.3.4] eth/downloader: fix premature exit before notifying all part fetchers
(cherry picked from commit 64ee5763eebe7e57e761be840f0b80ed7be93ca7)
Diffstat (limited to 'eth')
-rw-r--r--eth/downloader/downloader.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 1f16845e1..157f25b1a 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -1230,9 +1230,11 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error {
case ch <- false:
case <-d.cancelCh:
}
- return nil
}
}
+ if !cont {
+ return nil
+ }
// Queue not yet full, fetch the next batch
from += uint64(len(headers))
getHeaders(from)