|
|
@ -589,7 +589,7 @@ OUTER_LOOP: |
|
|
|
prs := ps.GetRoundState() |
|
|
|
if rs.Height == prs.Height { |
|
|
|
if maj23, ok := rs.Votes.Prevotes(prs.Round).TwoThirdsMajority(); ok { |
|
|
|
peer.TrySend(DataChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
peer.TrySend(StateChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
Height: prs.Height, |
|
|
|
Round: prs.Round, |
|
|
|
Type: types.VoteTypePrevote, |
|
|
@ -608,7 +608,7 @@ OUTER_LOOP: |
|
|
|
prs := ps.GetRoundState() |
|
|
|
if rs.Height == prs.Height { |
|
|
|
if maj23, ok := rs.Votes.Precommits(prs.Round).TwoThirdsMajority(); ok { |
|
|
|
peer.TrySend(DataChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
peer.TrySend(StateChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
Height: prs.Height, |
|
|
|
Round: prs.Round, |
|
|
|
Type: types.VoteTypePrecommit, |
|
|
@ -625,7 +625,7 @@ OUTER_LOOP: |
|
|
|
prs := ps.GetRoundState() |
|
|
|
if rs.Height == prs.Height && prs.ProposalPOLRound >= 0 { |
|
|
|
if maj23, ok := rs.Votes.Prevotes(prs.ProposalPOLRound).TwoThirdsMajority(); ok { |
|
|
|
peer.TrySend(DataChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
peer.TrySend(StateChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
Height: prs.Height, |
|
|
|
Round: prs.ProposalPOLRound, |
|
|
|
Type: types.VoteTypePrevote, |
|
|
@ -642,9 +642,9 @@ OUTER_LOOP: |
|
|
|
// Maybe send Height/CatchupCommitRound/CatchupCommit.
|
|
|
|
{ |
|
|
|
prs := ps.GetRoundState() |
|
|
|
if prs.CatchupCommitRound != -1 { |
|
|
|
if prs.CatchupCommitRound != -1 && prs.Height <= conR.blockStore.Height() { |
|
|
|
commit := conR.blockStore.LoadBlockCommit(prs.Height) |
|
|
|
peer.TrySend(DataChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
peer.TrySend(StateChannel, struct{ ConsensusMessage }{&VoteSetMaj23Message{ |
|
|
|
Height: prs.Height, |
|
|
|
Round: commit.Round(), |
|
|
|
Type: types.VoteTypePrecommit, |
|
|
|