diff --git a/consensus/reactor.go b/consensus/reactor.go index c013f6a1..664deb6b 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -797,8 +797,8 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) { ps.mtx.Lock() defer ps.mtx.Unlock() - // Ignore duplicate messages. - if ps.Height == msg.Height && ps.Round == msg.Round && ps.Step == msg.Step { + // Ignore duplicates or decreases + if CompareHRS(msg.Height, msg.Round, msg.Step, ps.Height, ps.Round, ps.Step) <= 0 { return } diff --git a/consensus/state.go b/consensus/state.go index 386b53a0..6b12d05d 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1134,7 +1134,7 @@ func (cs *ConsensusState) enterCommit(height int, commitRound int) { defer func() { // Done enterCommit: - // keep ca.Round the same, it points to the right Precommits set. + // keep cs.Round the same, commitRound points to the right Precommits set. cs.updateRoundStep(cs.Round, RoundStepCommit) cs.CommitRound = commitRound cs.newStep()