Commit eef4776b authored by obscuren's avatar obscuren

eth: ignore NewBlockMsg with lower td

parent 1bc2d83b
...@@ -257,8 +257,9 @@ func (self *ProtocolManager) handleMsg(p *peer) error { ...@@ -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 // Make sure the block isn't already known. If this is the case simply drop
// the message and move on. // the message and move on. If the TD is < currentTd; drop it as well. If this
if self.chainman.HasBlock(hash) { // chain at some point becomes canonical, the downloader will fetch it.
if self.chainman.HasBlock(hash) && self.chainman.Td().Cmp(request.TD) > 0 {
break break
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment