state.go comment fixes

This commit is contained in:
William Banfield
2021-09-24 10:38:16 -04:00
parent 7d8c047586
commit a0f7dce51c
+4 -3
View File
@@ -1265,8 +1265,9 @@ func (cs *State) createProposalBlock() (block *types.Block, blockParts *types.Pa
// Enter: `timeoutPropose` after entering Propose.
// Enter: proposal block and POL is ready.
// Prevote for LockedBlock if we're locked, or ProposalBlock if valid.
// Otherwise vote nil.
// If we received a valid proposal within this round that matches the block we are
// locked on or matches a block that received a POL in a previous round, prevote
// for the proposal, otherwise vote nil.
func (cs *State) enterPrevote(height int64, round int32) {
logger := cs.Logger.With("height", height, "round", round)
@@ -1296,7 +1297,7 @@ func (cs *State) enterPrevote(height int64, round int32) {
func (cs *State) defaultDoPrevote(height int64, round int32) {
logger := cs.Logger.With("height", height, "round", round)
// If ProposalBlock is nil, prevote nil.
// We did not receive a proposal within this round.
if cs.ProposalBlock == nil {
logger.Debug("prevote step: ProposalBlock is nil")
cs.signAddVote(tmproto.PrevoteType, nil, types.PartSetHeader{})