aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-29 19:40:39 +0800
committerobscuren <geffobscura@gmail.com>2015-04-29 19:40:39 +0800
commit13364a2dcf08924605408ae0e9233ea8e51d37fb (patch)
tree12c8c3a447b47883ab7070deaa91d9cfb20e4447 /eth
parent745c368987a08d1b8ae669f38ce04de443ff6064 (diff)
downloaddexon-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar
dexon-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.gz
dexon-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.bz2
dexon-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.lz
dexon-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.xz
dexon-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.zst
dexon-13364a2dcf08924605408ae0e9233ea8e51d37fb.zip
eth/downloader: reset the chain when parent is missing during processing
Diffstat (limited to 'eth')
-rw-r--r--eth/downloader/downloader.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 63d202a7f..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