[misc] add one comment

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3379/head
Leo Chen 4 years ago
parent 55f6c29045
commit 60f7237c65
  1. 1
      consensus/view_change.go

@ -216,6 +216,7 @@ func (consensus *Consensus) onViewChange(msg *msg_pb.Message) {
preparedMsgs := consensus.FBFTLog.GetMessagesByTypeSeq(
msg_pb.MessageType_PREPARED, recvMsg.BlockNum,
)
// search for local prepared msg and add one if not found
preparedMsg := consensus.FBFTLog.FindMessageByViewID(preparedMsgs, recvMsg.ViewID)
if preparedMsg == nil {
// create prepared message for new leader

Loading…
Cancel
Save