aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-02-29 20:22:28 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-02-29 20:22:28 +0800
commit64ee5763eebe7e57e761be840f0b80ed7be93ca7 (patch)
tree4c3227568bd6217340f04f3fb387b371a6f789af /eth
parent4e7abcff3086fc3ed11299003c1f189901757801 (diff)
downloaddexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar
dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.gz
dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.bz2
dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.lz
dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.xz
dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.zst
dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.zip
eth/downloader: fix premature exit before notifying all part fetchers
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 017d25704..143d8bde7 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -1263,9 +1263,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)