diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-29 19:47:26 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-04-29 19:47:26 +0800 |
commit | 764e81bf12bc45b00cec7db216e72d6396cf0c13 (patch) | |
tree | 4f995c9e736b2376dd63a469bd8a38fbc6751cd7 /eth/downloader | |
parent | bac4440e1751fd3b71f8271260d1c8af236d2cec (diff) | |
parent | 13364a2dcf08924605408ae0e9233ea8e51d37fb (diff) | |
download | go-tangerine-764e81bf12bc45b00cec7db216e72d6396cf0c13.tar go-tangerine-764e81bf12bc45b00cec7db216e72d6396cf0c13.tar.gz go-tangerine-764e81bf12bc45b00cec7db216e72d6396cf0c13.tar.bz2 go-tangerine-764e81bf12bc45b00cec7db216e72d6396cf0c13.tar.lz go-tangerine-764e81bf12bc45b00cec7db216e72d6396cf0c13.tar.xz go-tangerine-764e81bf12bc45b00cec7db216e72d6396cf0c13.tar.zst go-tangerine-764e81bf12bc45b00cec7db216e72d6396cf0c13.zip |
Merge pull request #825 from obscuren/develop
core: chain fork fix
Diffstat (limited to 'eth/downloader')
-rw-r--r-- | eth/downloader/downloader.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 60d908758..a3917854f 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -436,6 +436,8 @@ func (d *Downloader) process(peer *peer) error { if err != nil && core.IsParentErr(err) { glog.V(logger.Debug).Infoln("Aborting process due to missing parent.") + // XXX this needs a lot of attention + blocks = nil break } else if err != nil { // immediatly unregister the false peer but do not disconnect @@ -472,3 +474,7 @@ func (d *Downloader) isProcessing() bool { func (d *Downloader) isBusy() bool { return d.isFetchingHashes() || d.isDownloadingBlocks() || d.isProcessing() } + +func (d *Downloader) IsBusy() bool { + return d.isBusy() +} |