node: pass eventbus at construction time (#8084)

* node: pass eventbus at construction time

* remove cruft
This commit is contained in:
Sam Kleinman
2022-03-08 08:04:59 -05:00
committed by GitHub
parent 4edc8c5523
commit c35d6d6e2c
17 changed files with 113 additions and 105 deletions

View File

@@ -323,6 +323,8 @@ func TestCreateProposalBlock(t *testing.T) {
assert.NoError(t, err)
}
eventBus := eventbus.NewDefault(logger)
require.NoError(t, eventBus.Start(ctx))
blockExec := sm.NewBlockExecutor(
stateStore,
logger,
@@ -330,6 +332,7 @@ func TestCreateProposalBlock(t *testing.T) {
mp,
evidencePool,
blockStore,
eventBus,
)
commit := types.NewCommit(height-1, 0, types.BlockID{}, nil)
@@ -398,6 +401,9 @@ func TestMaxTxsProposalBlockSize(t *testing.T) {
err = mp.CheckTx(ctx, tx, nil, mempool.TxInfo{})
assert.NoError(t, err)
eventBus := eventbus.NewDefault(logger)
require.NoError(t, eventBus.Start(ctx))
blockExec := sm.NewBlockExecutor(
stateStore,
logger,
@@ -405,6 +411,7 @@ func TestMaxTxsProposalBlockSize(t *testing.T) {
mp,
sm.EmptyEvidencePool{},
blockStore,
eventBus,
)
commit := types.NewCommit(height-1, 0, types.BlockID{}, nil)
@@ -469,6 +476,9 @@ func TestMaxProposalBlockSize(t *testing.T) {
assert.NoError(t, err)
}
eventBus := eventbus.NewDefault(logger)
require.NoError(t, eventBus.Start(ctx))
blockExec := sm.NewBlockExecutor(
stateStore,
logger,
@@ -476,6 +486,7 @@ func TestMaxProposalBlockSize(t *testing.T) {
mp,
sm.EmptyEvidencePool{},
blockStore,
eventBus,
)
blockID := types.BlockID{