|
|
@ -45,13 +45,15 @@ func TestMempoolNoProgressUntilTxsAvailable(t *testing.T) { |
|
|
|
func TestMempoolProgressAfterCreateEmptyBlocksInterval(t *testing.T) { |
|
|
|
config := ResetConfig("consensus_mempool_txs_available_test") |
|
|
|
defer os.RemoveAll(config.RootDir) |
|
|
|
|
|
|
|
config.Consensus.CreateEmptyBlocksInterval = ensureTimeout |
|
|
|
state, privVals := randGenesisState(1, false, 10) |
|
|
|
cs := newStateWithConfig(config, state, privVals[0], NewCounterApplication()) |
|
|
|
|
|
|
|
assertMempool(cs.txNotifier).EnableTxsAvailable() |
|
|
|
height, round := cs.Height, cs.Round |
|
|
|
|
|
|
|
newBlockCh := subscribe(cs.eventBus, types.EventQueryNewBlock) |
|
|
|
startTestRound(cs, height, round) |
|
|
|
startTestRound(cs, cs.Height, cs.Round) |
|
|
|
|
|
|
|
ensureNewEventOnChannel(newBlockCh) // first block gets committed
|
|
|
|
ensureNoNewEventOnChannel(newBlockCh) // then we dont make a block ...
|
|
|
|