aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
Diffstat (limited to 'eth')
-rw-r--r--eth/handler.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/eth/handler.go b/eth/handler.go
index 8db476eb4..d00d00f23 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -159,6 +159,12 @@ out:
}
func (pm *ProtocolManager) synchronise(peer *peer) {
+ // Make sure the peer's TD is higher than our own. If not drop.
+ if peer.td.Cmp(pm.chainman.Td()) <= 0 {
+ return
+ }
+
+ glog.V(logger.Info).Infof("Synchronisation attempt using %s TD=%v\n", peer.id, peer.td)
// Get the hashes from the peer (synchronously)
err := pm.downloader.Synchronise(peer.id, peer.recentHash)
if err != nil {