comment updates

This commit is contained in:
William Banfield
2021-09-20 17:14:36 -04:00
parent abc07b4f6a
commit 8bfedb6ff0
2 changed files with 3 additions and 4 deletions
-1
View File
@@ -2061,7 +2061,6 @@ func (cs *State) addVote(vote *types.Vote, peerID types.NodeID) (added bool, err
if blockID, ok := prevotes.TwoThirdsMajority(); ok {
// There was a polka!
// If it matches our ProposalBlock, update the ValidBlock
// If we're locked but this is a recent polka, lock on the new block.
if (cs.LockedBlock != nil) &&
(cs.LockedRound < vote.Round) &&
(vote.Round <= cs.Round) &&
+3 -3
View File
@@ -803,7 +803,6 @@ func TestStatePOLDoesNotUnlock(t *testing.T) {
// go to prevote, prevote for locked block (not proposal)
ensurePrevote(voteCh, height, round)
validatePrevote(t, cs1, round, vss[0], theBlockHash)
// add >2/3 prevotes for nil from all other validators
signAddVotes(config, cs1, tmproto.PrevoteType, nil, types.PartSetHeader{}, vs2, vs3, vs4)
@@ -1204,7 +1203,7 @@ func TestProposeValidBlock(t *testing.T) {
signAddVotes(config, cs1, tmproto.PrevoteType, propBlockHash, propBlock.MakePartSet(partSize).Header(), vs2, vs3, vs4)
ensurePrecommit(voteCh, height, round)
// we should have precommitted
// we should have precommitted the proposed block in this round.
validatePrecommit(t, cs1, round, round, vss[0], propBlockHash, propBlockHash)
signAddVotes(config, cs1, tmproto.PrecommitType, nil, types.PartSetHeader{}, vs2, vs3, vs4)
@@ -1226,7 +1225,8 @@ func TestProposeValidBlock(t *testing.T) {
signAddVotes(config, cs1, tmproto.PrecommitType, nil, types.PartSetHeader{}, vs2, vs3, vs4)
ensurePrecommit(voteCh, height, round)
// we should have precommitted
// we should have precommitted nil during this round because we received
// >2/3 precommits for nil from the other validators.
validatePrecommit(t, cs1, round, 0, vss[0], nil, propBlockHash)
incrementRound(vs2, vs3, vs4)