From ba2236fa513e06603d3fa2a6d721be3879d7f50e Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 3 May 2015 14:11:47 +0200 Subject: [PATCH] cmd/geth, eth: bump version & tmp fix for incorrect TD peers --- cmd/geth/main.go | 2 +- eth/sync.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index ef007051c..0f5ebf5be 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -47,7 +47,7 @@ import _ "net/http/pprof" const ( ClientIdentifier = "Geth" - Version = "0.9.14" + Version = "0.9.15" ) var ( diff --git a/eth/sync.go b/eth/sync.go index 16d85d1f1..9e8b21a7c 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -89,6 +89,13 @@ func (pm *ProtocolManager) synchronise(peer *peer) { return } + // FIXME if we have the hash in our chain and the TD of the peer is + // much higher than ours, something is wrong with us or the peer. + // Check if the hash is on our own chain + if pm.chainman.HasBlock(peer.recentHash) { + return + } + // Get the hashes from the peer (synchronously) err := pm.downloader.Synchronise(peer.id, peer.recentHash) if err != nil && err == downloader.ErrBadPeer {