This commit is contained in:
William Banfield
2021-11-29 18:07:28 -05:00
parent 56a7ee9cb0
commit dccca05541
2 changed files with 6 additions and 2 deletions

View File

@@ -187,7 +187,9 @@ func (p *pbtsTestHarness) nextHeight(proposer types.PrivValidator, deliverTime,
func collectResults(ctx context.Context, t *testing.T, eb *eventbus.EventBus, address []byte) <-chan heightResult {
t.Helper()
resultCh := make(chan heightResult)
voteSub, err := eb.SubscribeWithArgs(ctx, tmpubsub.SubscribeArgs{ClientID: "voteSubscriber", Query: types.EventQueryVote})
voteSub, err := eb.SubscribeWithArgs(ctx, tmpubsub.SubscribeArgs{
ClientID: "voteSubscriber",
Query: types.EventQueryVote})
require.NoError(t, err)
go func() {
var res heightResult

View File

@@ -1119,9 +1119,11 @@ func (cs *State) enterPropose(height int64, round int32) {
}
}()
// If we don't get the proposal and all block parts quick enough, enterPrevote
//nolint: lll
waitingTime := proposalStepWaitingTime(tmtime.DefaultSource{}, cs.state.LastBlockTime, cs.state.ConsensusParams.Timestamp)
proposalTimeout := maxDuration(cs.config.Propose(round), waitingTime)
// If we don't get the proposal and all block parts quick enough, enterPrevote
cs.scheduleTimeout(proposalTimeout, height, round, cstypes.RoundStepPropose)
// Nothing more to do if we're not a validator