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 13:04:59 +00:00
committed by GitHub
parent 4edc8c5523
commit c35d6d6e2c
17 changed files with 113 additions and 105 deletions
+2 -3
View File
@@ -270,6 +270,7 @@ func createConsensusReactor(
blockStore,
mp,
evidencePool,
eventBus,
consensus.StateMetrics(csMetrics),
)
if err != nil {
@@ -286,6 +287,7 @@ func createConsensusReactor(
consensusState,
router.OpenChannel,
peerManager.Subscribe(ctx),
eventBus,
waitSync,
csMetrics,
)
@@ -293,9 +295,6 @@ func createConsensusReactor(
return nil, nil, err
}
// Services which will be publishing and/or subscribing for messages (events)
// consensusReactor will set it on consensusState and blockExecutor.
reactor.SetEventBus(eventBus)
return reactor, consensusState, nil
}