From 9184733261efc20d9c4b5328df03c8da8f2ff1ec Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Wed, 27 Jun 2018 02:34:11 -0700 Subject: [PATCH] try it with new consensus? --- consensus/state.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/consensus/state.go b/consensus/state.go index 7c18d8b0..19c17f33 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1587,7 +1587,7 @@ func (cs *ConsensusState) addVote(vote *types.Vote, peerID p2p.ID) (added bool, if prevotes.HasTwoThirdsMajority() { cs.enterPrecommit(height, vote.Round) } else { - cs.enterPrevote(height, vote.Round) // if the vote is ahead of us + cs.enterPropose(height, vote.Round) // we can't prevote until we wait for the proposal. cs.enterPrevoteWait(height, vote.Round) } } else if cs.Proposal != nil && 0 <= cs.Proposal.POLRound && cs.Proposal.POLRound == vote.Round { @@ -1621,7 +1621,8 @@ func (cs *ConsensusState) addVote(vote *types.Vote, peerID p2p.ID) (added bool, } } else if cs.Round <= vote.Round && precommits.HasTwoThirdsAny() { cs.enterNewRound(height, vote.Round) - cs.enterPrecommit(height, vote.Round) + cs.enterPrevote(height, vote.Round) + cs.enterPrevoteWait(height, vote.Round) cs.enterPrecommitWait(height, vote.Round) } default: