diff --git a/internal/consensus/state.go b/internal/consensus/state.go index d3faa2149..2e54f5a17 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -746,7 +746,7 @@ func (cs *State) handleTimeout( // XXX: should we fire timeout here (for timeout commit)? _ = cs.ctrl.Dispatch(ctx, &EnterNewRoundEvent{Height: ti.Height}, stateData) case cstypes.RoundStepNewRound: - _ = cs.ctrl.Dispatch(ctx, &EnterProposeEvent{Height: ti.Height}, stateData) + _ = cs.ctrl.Dispatch(ctx, &EnterProposeEvent{Height: ti.Height, Round: ti.Round}, stateData) case cstypes.RoundStepPropose: if err := cs.eventBus.PublishEventTimeoutPropose(stateData.RoundStateEvent()); err != nil { cs.logger.Error("failed publishing timeout propose", "err", err) @@ -788,7 +788,7 @@ func (cs *State) handleTxsAvailable(ctx context.Context, stateData *StateData) { cs.roundScheduler.ScheduleTimeout(timeoutCommit, stateData.Height, 0, cstypes.RoundStepNewRound) case cstypes.RoundStepNewRound: // after timeoutCommit - _ = cs.ctrl.Dispatch(ctx, &EnterProposeEvent{Height: stateData.Height}, stateData) + _ = cs.ctrl.Dispatch(ctx, &EnterProposeEvent{Height: stateData.Height, Round: stateData.Round}, stateData) } } diff --git a/internal/consensus/ticker.go b/internal/consensus/ticker.go index a768854c6..30b94d3ad 100644 --- a/internal/consensus/ticker.go +++ b/internal/consensus/ticker.go @@ -115,9 +115,9 @@ func (t *timeoutTicker) timeoutRoutine(ctx context.Context) { // NOTE time.Timer allows duration to be non-positive ti = newti t.timer.Reset(ti.Duration) - t.logger.Trace("Internal state machine timeout scheduled", "duration", ti.Duration, "height", ti.Height, "round", ti.Round, "step", ti.Step.String()) + t.logger.Trace("Internal state machine timeout scheduled", "duration", ti.Duration.String(), "height", ti.Height, "round", ti.Round, "step", ti.Step.String()) case <-t.timer.C: - t.logger.Debug("Internal state machine timeout elapsed", "duration", ti.Duration, "height", ti.Height, "round", ti.Round, "step", ti.Step.String()) + t.logger.Debug("Internal state machine timeout elapsed", "duration", ti.Duration.String(), "height", ti.Height, "round", ti.Round, "step", ti.Step.String()) // go routine here guarantees timeoutRoutine doesn't block. // Determinism comes from playback in the receiveRoutine. // We can eliminate it by merging the timeoutRoutine into receiveRoutine