aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
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 /eth/handler.go
parenta9e4b96573f7ce900227f0b19d621e363330d914 (diff)
downloadgo-tangerine-1681ee9883a5cd2dbcb423d08b491343c682c655.tar.gz
go-tangerine-1681ee9883a5cd2dbcb423d08b491343c682c655.tar.zst
go-tangerine-1681ee9883a5cd2dbcb423d08b491343c682c655.zip
eth: added a few informative messages regarding downloading
Diffstat (limited to 'eth/handler.go')
-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 {