eth: updated fetcher.go, fixed bugs

This commit is contained in:
Marius van der Wijden 2019-08-27 17:04:45 +02:00 committed by GitHub
parent 5c27338ca3
commit bef16e10fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
wasGood = true
go f.broadcastBlock(block, true)
}
}
END:
if wasGood {
f.peers[peer] = f.peers[peer] + 1
} else {