mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 12:07:17 +00:00
eth: ignore NewBlockMsg with lower td
This commit is contained in:
parent
1bc2d83b6f
commit
eef4776b5b
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user