aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go
index 065116fd0..bb12e1904 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -257,8 +257,9 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
})
// Make sure the block isn't already known. If this is the case simply drop
- // the message and move on.
- if self.chainman.HasBlock(hash) {
+ // the message and move on. If the TD is < currentTd; drop it as well. If this
+ // chain at some point becomes canonical, the downloader will fetch it.
+ if self.chainman.HasBlock(hash) && self.chainman.Td().Cmp(request.TD) > 0 {
break
}