mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth: updated fetcher.go, fixed bugs
This commit is contained in:
parent
5c27338ca3
commit
bef16e10fd
1 changed files with 4 additions and 5 deletions
|
|
@ -692,14 +692,13 @@ func (f *Fetcher) propabilisticCutThrough(peer string, block *types.Block) {
|
|||
if err = f.verifyHeader(block.Header()); err != nil {
|
||||
if err != consensus.ErrFutureBlock {
|
||||
wasGood = false
|
||||
goto END
|
||||
}
|
||||
} else {
|
||||
// Then send
|
||||
propBroadcastOutTimer.UpdateSince(block.ReceivedAt)
|
||||
go f.broadcastBlock(block, true)
|
||||
}
|
||||
// Then send
|
||||
propBroadcastOutTimer.UpdateSince(block.ReceivedAt)
|
||||
wasGood = true
|
||||
}
|
||||
END:
|
||||
if wasGood {
|
||||
f.peers[peer] = f.peers[peer] + 1
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue