aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-05-15 07:14:21 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-05-15 20:01:58 +0800
commitbcc2980179f39eea4825df72ad882274086d912e (patch)
tree8b72d5183d3aa20d7054862623940f72f7ae0de4 /eth/downloader/downloader.go
parent366e9627e8cdddd8111789dc13050b1dd8ec6fb2 (diff)
downloadgo-tangerine-bcc2980179f39eea4825df72ad882274086d912e.tar
go-tangerine-bcc2980179f39eea4825df72ad882274086d912e.tar.gz
go-tangerine-bcc2980179f39eea4825df72ad882274086d912e.tar.bz2
go-tangerine-bcc2980179f39eea4825df72ad882274086d912e.tar.lz
go-tangerine-bcc2980179f39eea4825df72ad882274086d912e.tar.xz
go-tangerine-bcc2980179f39eea4825df72ad882274086d912e.tar.zst
go-tangerine-bcc2980179f39eea4825df72ad882274086d912e.zip
eth/downloader: check sync after failed attacks
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r--eth/downloader/downloader.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index c90d289df..30be0dde5 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -268,8 +268,12 @@ out:
// Insert all the new hashes, but only continue if got something useful
inserts := d.queue.Insert(hashPack.hashes)
if inserts == 0 && !done {
+ glog.V(logger.Debug).Infof("Peer (%s) responded with stale hashes\n", activePeer.id)
+ d.queue.Reset()
+
return ErrBadPeer
- } else if !done {
+ }
+ if !done {
activePeer.getHashes(hash)
continue
}