From 1681ee9883a5cd2dbcb423d08b491343c682c655 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 24 Apr 2015 17:03:09 +0200 Subject: [PATCH] eth: added a few informative messages regarding downloading --- eth/handler.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 {