Merge pull request #3426 from rlan35/fix_commit_override

Simplify commit override
pull/3429/head
Rongjian Lan 4 years ago committed by GitHub
commit 3a81256668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      consensus/validator.go

@ -290,10 +290,9 @@ func (consensus *Consensus) onCommitted(msg *msg_pb.Message) {
mask.SetMask(commitSigBitmap[bls.BLSSignatureSizeInBytes:])
cur := mask.CountEnabled()
if new > cur {
consensus.getLogger().Info().Hex("old", commitSigBitmap).Hex("new", recvMsg.Payload).Msg("[OnCommitted] Overriding commit signatures!!")
consensus.Blockchain.WriteCommitSig(blockObj.NumberU64(), recvMsg.Payload)
}
} else {
consensus.Blockchain.WriteCommitSig(blockObj.NumberU64(), recvMsg.Payload)
}
consensus.tryCatchup()

Loading…
Cancel
Save