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)
downloadgo-tangerine-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar
go-tangerine-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.gz
go-tangerine-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.bz2
go-tangerine-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.lz
go-tangerine-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.xz
go-tangerine-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.zst
go-tangerine-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)