From afff87f4ecd69e5e49b6ccbe284a2cab3b6774d9 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Tue, 21 Sep 2021 11:41:41 -0400 Subject: [PATCH] update unlock description --- internal/consensus/state.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/consensus/state.go b/internal/consensus/state.go index 3779d17a5..ce4ae6ec4 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -2059,8 +2059,12 @@ func (cs *State) addVote(vote *types.Vote, peerID types.NodeID) (added bool, err // Check to see if >2/3 of the voting power on the network voted for any non-nil block. if blockID, ok := prevotes.TwoThirdsMajority(); ok && len(blockID.Hash) != 0 { - // There was a polka! - // If it matches our ProposalBlock, update the ValidBlock + // Greater than 2/3 of the voting power on the network voted for some + // non-nil block + + // If we locked a different block in an earlier round, unlock it. + // We are going to relock a new block when we precommit, so this unlock + // is only temporary. if (cs.LockedBlock != nil) && (cs.LockedRound < vote.Round) && (vote.Round <= cs.Round) &&