diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index f2024fe81..6b52e6308 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -265,7 +265,7 @@ func TestValidatorSetChanges(t *testing.T) { // Check we can make blocks with skip_timeout_commit=false func TestReactorWithTimeoutCommit(t *testing.T) { N := 4 - css := randConsensusNet(N, "consensus_reactor_with_timeout_commit_test", newMockTickerFunc(false)) + css := randConsensusNet(N, "consensus_reactor_with_timeout_commit_test", newMockTickerFunc(false), newCounter) // override default SkipTimeoutCommit == true for tests for i := 0; i < N; i++ { @@ -302,7 +302,7 @@ func TestReactorWithTimeoutCommit(t *testing.T) { timeoutWaitGroup(t, N-1, func(wg *sync.WaitGroup, j int) { <-eventChans[j] wg.Done() - }) + }, css) } func waitForAndValidateBlock(t *testing.T, n int, activeVals map[string]struct{}, eventChans []chan interface{}, css []*ConsensusState, txs ...[]byte) { diff --git a/consensus/state.go b/consensus/state.go index 13125a5d3..769bb1e47 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1455,7 +1455,7 @@ func (cs *ConsensusState) addVote(vote *types.Vote, peerKey string) (added bool, cs.enterPrecommit(height, vote.Round) cs.enterCommit(height, vote.Round) - if cs.timeoutParams.SkipTimeoutCommit && cs.LastCommit.HasAll() { + if cs.timeoutParams.SkipTimeoutCommit && precommits.HasAll() { // if we have all the votes now, // go straight to new round (skip timeout commit) // cs.scheduleTimeout(time.Duration(0), cs.Height, 0, RoundStepNewHeight)