aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-24 23:03:09 +0800
committerobscuren <geffobscura@gmail.com>2015-04-24 23:03:09 +0800
commit1681ee9883a5cd2dbcb423d08b491343c682c655 (patch)
treed7d4f9a0201ad579a1af37dea3fa4e2af51f6654
parenta9e4b96573f7ce900227f0b19d621e363330d914 (diff)
downloaddexon-1681ee9883a5cd2dbcb423d08b491343c682c655.tar
dexon-1681ee9883a5cd2dbcb423d08b491343c682c655.tar.gz
dexon-1681ee9883a5cd2dbcb423d08b491343c682c655.tar.bz2
dexon-1681ee9883a5cd2dbcb423d08b491343c682c655.tar.lz
dexon-1681ee9883a5cd2dbcb423d08b491343c682c655.tar.xz
dexon-1681ee9883a5cd2dbcb423d08b491343c682c655.tar.zst
dexon-1681ee9883a5cd2dbcb423d08b491343c682c655.zip
eth: added a few informative messages regarding downloading
-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 {