mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +00:00
eth: drop blocks that are known
This commit is contained in:
parent
cc436c4b28
commit
ecc74d76cc
1 changed files with 6 additions and 0 deletions
|
|
@ -256,6 +256,12 @@ func (self *ProtocolManager) handleMsg(p *peer) error {
|
||||||
RemoteId: p.ID().String(),
|
RemoteId: p.ID().String(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 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) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
// Attempt to insert the newly received by checking if the parent exists.
|
// Attempt to insert the newly received by checking if the parent exists.
|
||||||
// if the parent exists we process the block and propagate to our peers
|
// if the parent exists we process the block and propagate to our peers
|
||||||
// if the parent does not exists we delegate to the downloader.
|
// if the parent does not exists we delegate to the downloader.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue