aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader.go
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/downloader/downloader.go
parent745c368987a08d1b8ae669f38ce04de443ff6064 (diff)
downloadgo-tangerine-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar
go-tangerine-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.gz
go-tangerine-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.bz2
go-tangerine-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.lz
go-tangerine-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.xz
go-tangerine-13364a2dcf08924605408ae0e9233ea8e51d37fb.tar.zst
go-tangerine-13364a2dcf08924605408ae0e9233ea8e51d37fb.zip
eth/downloader: reset the chain when parent is missing during processing
Diffstat (limited to 'eth/downloader/downloader.go')
-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