@@ -726,7 +726,6 @@ func (cs *State) updateToState(state sm.State) {
726726 cs .Votes = cstypes .NewHeightVoteSet (state .ChainID , height , validators )
727727 cs .CommitRound = - 1
728728 cs .LastValidators = state .LastValidators
729- cs .TriggeredTimeoutPrecommit = false
730729
731730 cs .state = state
732731
@@ -1052,7 +1051,6 @@ func (cs *State) enterNewRound(height int64, round int32) {
10521051 }
10531052
10541053 cs .Votes .SetRound (tmmath .SafeAddInt32 (round , 1 )) // also track next round (round+1) to allow round-skipping
1055- cs .TriggeredTimeoutPrecommit = false
10561054
10571055 if err := cs .eventBus .PublishEventNewRound (cs .NewRoundEvent ()); err != nil {
10581056 cs .Logger .Error ("failed publishing new round" , "err" , err )
@@ -1491,12 +1489,10 @@ func (cs *State) enterPrecommit(height int64, round int32) {
14911489// Enter: any +2/3 precommits for next round.
14921490func (cs * State ) enterPrecommitWait (height int64 , round int32 ) {
14931491 logger := cs .Logger .With ("height" , height , "round" , round )
1494-
1495- if cs .Height != height || round < cs .Round || (cs .Round == round && cs .TriggeredTimeoutPrecommit ) {
1492+ if cs .Height != height || round < cs .Round || (cs .Round == round && cstypes .RoundStepPrecommitWait <= cs .Step ) {
14961493 logger .Debug (
14971494 "entering precommit wait step with invalid args" ,
1498- "triggered_timeout" , cs .TriggeredTimeoutPrecommit ,
1499- "current" , fmt .Sprintf ("%v/%v" , cs .Height , cs .Round ),
1495+ "current" , fmt .Sprintf ("%v/%v/%v" , cs .Height , cs .Round , cs .Step ),
15001496 )
15011497 return
15021498 }
@@ -1512,7 +1508,7 @@ func (cs *State) enterPrecommitWait(height int64, round int32) {
15121508
15131509 defer func () {
15141510 // Done enterPrecommitWait:
1515- cs .TriggeredTimeoutPrecommit = true
1511+ cs .updateRoundStep ( round , cstypes . RoundStepPrecommitWait )
15161512 cs .newStep ()
15171513 }()
15181514
0 commit comments