From 60f7237c653354a34cf9c14d3c91f5b6d80ca912 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Fri, 2 Oct 2020 23:37:22 +0000 Subject: [PATCH] [misc] add one comment Signed-off-by: Leo Chen --- consensus/view_change.go | 1 + 1 file changed, 1 insertion(+) diff --git a/consensus/view_change.go b/consensus/view_change.go index 096d9008d..682e1ea47 100644 --- a/consensus/view_change.go +++ b/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