mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-24 23:46:17 +00:00
fix dv m2 validate block detail before broadcast
This commit is contained in:
parent
53e39d77ac
commit
1175d8e1b1
1 changed files with 2 additions and 1 deletions
|
|
@ -665,8 +665,8 @@ func (f *Fetcher) insert(peer string, block *types.Block) {
|
|||
return
|
||||
}
|
||||
}
|
||||
go f.broadcastBlock(block, true)
|
||||
if newBlock.Hash() == block.Hash() {
|
||||
go f.broadcastBlock(block, true)
|
||||
return
|
||||
}
|
||||
block = newBlock
|
||||
|
|
@ -693,6 +693,7 @@ func (f *Fetcher) insert(peer string, block *types.Block) {
|
|||
|
||||
// If import succeeded, broadcast the block
|
||||
propAnnounceOutTimer.UpdateSince(block.ReceivedAt)
|
||||
go f.broadcastBlock(block, true)
|
||||
go f.broadcastBlock(block, false)
|
||||
|
||||
}()
|
||||
|
|
|
|||
Loading…
Reference in a new issue