diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-15 06:40:16 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-15 20:01:58 +0800 |
commit | cd2fb0905109828028172c84f9c10f1343647ca6 (patch) | |
tree | ede1984738a0d16f338341f7a1bc94e17381a715 /eth/sync.go | |
parent | c1f0d40e34a80f4453a9a54f90e2d4551c3bdb05 (diff) | |
download | go-tangerine-cd2fb0905109828028172c84f9c10f1343647ca6.tar go-tangerine-cd2fb0905109828028172c84f9c10f1343647ca6.tar.gz go-tangerine-cd2fb0905109828028172c84f9c10f1343647ca6.tar.bz2 go-tangerine-cd2fb0905109828028172c84f9c10f1343647ca6.tar.lz go-tangerine-cd2fb0905109828028172c84f9c10f1343647ca6.tar.xz go-tangerine-cd2fb0905109828028172c84f9c10f1343647ca6.tar.zst go-tangerine-cd2fb0905109828028172c84f9c10f1343647ca6.zip |
eth, eth/downloader: prevent hash repeater attack
Diffstat (limited to 'eth/sync.go')
-rw-r--r-- | eth/sync.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eth/sync.go b/eth/sync.go index c89f34596..73f6253be 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -101,11 +101,13 @@ func (pm *ProtocolManager) synchronise(peer *peer) { case downloader.ErrBusy: glog.V(logger.Debug).Infof("Synchronisation already in progress") - case downloader.ErrTimeout: - glog.V(logger.Debug).Infof("Removing peer %v due to sync timeout", peer.id) + case downloader.ErrTimeout, downloader.ErrBadPeer: + glog.V(logger.Debug).Infof("Removing peer %v: %v", peer.id, err) pm.removePeer(peer) + case downloader.ErrPendingQueue: glog.V(logger.Debug).Infoln("Synchronisation aborted:", err) + default: glog.V(logger.Warn).Infof("Synchronisation failed: %v", err) } |