fix commit override

pull/3426/head
Rongjian Lan 4 years ago
parent 04e918eedd
commit f2f235006a
  1. 3
      consensus/validator.go

@ -290,10 +290,9 @@ func (consensus *Consensus) onCommitted(msg *msg_pb.Message) {
mask.SetMask(commitSigBitmap[bls.BLSSignatureSizeInBytes:]) mask.SetMask(commitSigBitmap[bls.BLSSignatureSizeInBytes:])
cur := mask.CountEnabled() cur := mask.CountEnabled()
if new > cur { 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) consensus.Blockchain.WriteCommitSig(blockObj.NumberU64(), recvMsg.Payload)
} }
} else {
consensus.Blockchain.WriteCommitSig(blockObj.NumberU64(), recvMsg.Payload)
} }
consensus.tryCatchup() consensus.tryCatchup()

Loading…
Cancel
Save