eth: added a few informative messages regarding downloading

This commit is contained in:
obscuren 2015-04-24 17:03:09 +02:00
parent a9e4b96573
commit 1681ee9883
1 changed files with 6 additions and 0 deletions

View File

@ -159,6 +159,12 @@ out:
} }
func (pm *ProtocolManager) synchronise(peer *peer) { 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) // Get the hashes from the peer (synchronously)
err := pm.downloader.Synchronise(peer.id, peer.recentHash) err := pm.downloader.Synchronise(peer.id, peer.recentHash)
if err != nil { if err != nil {