-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Tendermint version: d0c3457
What happened:
When handling timeout type RoundStepNewRound located at internal/consensus/state.go, the code calling enterPropose with round 0 all the time:
func (cs *State) handleTimeout(
ctx context.Context,
ti timeoutInfo,
rs cstypes.RoundState,
) {
/// hiden code ......
case cstypes.RoundStepNewRound:
cs.enterPropose(ctx, ti.Height, 0)
}And there are two places to setup this kind of timeout, one is located at State.enterNewRound:
func (cs *State) enterNewRound(ctx context.Context, height int64, round int32) {
/// hiden code ......
if waitForTxs {
if cs.config.CreateEmptyBlocksInterval > 0 {
cs.scheduleTimeout(cs.config.CreateEmptyBlocksInterval, height, round,
cstypes.RoundStepNewRound)
}
return
}
}and another is located at State.enterPropose:
func (cs *State) enterPropose(ctx context.Context, height int64, round int32) {
/// hiden code
if proposerWaitTime > 0 {
cs.scheduleTimeout(proposerWaitTime, height, round, cstypes.RoundStepNewRound)
return
}
}
}which are all not necessary to be round 0 with round variable equal 0.
What you expected to happen:
enterPropose should be called with ti.Round:
case cstypes.RoundStepNewRound:
cs.enterPropose(ctx, ti.Height, ti.Round)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels