diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-15 07:14:21 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-15 20:01:58 +0800 |
commit | bcc2980179f39eea4825df72ad882274086d912e (patch) | |
tree | 8b72d5183d3aa20d7054862623940f72f7ae0de4 /eth/downloader/downloader.go | |
parent | 366e9627e8cdddd8111789dc13050b1dd8ec6fb2 (diff) | |
download | go-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.go | 6 |
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 } |