mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
RoundActionCommit* bug fixes
This commit is contained in:
parent
6416185a6f
commit
09c20ddea1
@ -260,7 +260,7 @@ func (conR *ConsensusReactor) Receive(chId byte, peer *p2p.Peer, msgBytes []byte
|
|||||||
// Maybe run RoundActionCommitWait.
|
// Maybe run RoundActionCommitWait.
|
||||||
if vote.Type == VoteTypeCommit &&
|
if vote.Type == VoteTypeCommit &&
|
||||||
rs.Commits.HasTwoThirdsMajority() &&
|
rs.Commits.HasTwoThirdsMajority() &&
|
||||||
rs.Step < RoundStepCommit {
|
rs.Step < RoundStepCommitWait {
|
||||||
// NOTE: Do not call RunAction*() methods here directly.
|
// NOTE: Do not call RunAction*() methods here directly.
|
||||||
conR.doActionCh <- RoundAction{rs.Height, rs.Round, RoundActionCommitWait}
|
conR.doActionCh <- RoundAction{rs.Height, rs.Round, RoundActionCommitWait}
|
||||||
}
|
}
|
||||||
@ -422,6 +422,13 @@ ACTION_LOOP:
|
|||||||
broadcastNewRoundStep(RoundStepCommit)
|
broadcastNewRoundStep(RoundStepCommit)
|
||||||
if vote != nil {
|
if vote != nil {
|
||||||
conR.broadcastVote(rs, vote)
|
conR.broadcastVote(rs, vote)
|
||||||
|
// If we have +2/3 commits, queue an action to RoundActionCommitWait.
|
||||||
|
// Likely this is a duplicate action being pushed.
|
||||||
|
// See also Receive() where RoundActionCommitWait can be pushed in
|
||||||
|
// response to a vote from the network.
|
||||||
|
if rs.Commits.HasTwoThirdsMajority() {
|
||||||
|
conR.doActionCh <- RoundAction{rs.Height, rs.Round, RoundActionCommitWait}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// do not schedule next action.
|
// do not schedule next action.
|
||||||
continue ACTION_LOOP
|
continue ACTION_LOOP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user