eventbus: plumb contexts (#7337)

* eventbus: plumb contexts

* fix lint
This commit is contained in:
Sam Kleinman
2021-11-30 14:24:11 +00:00
committed by GitHub
parent c9f90953a2
commit 4af2dbd03b
22 changed files with 276 additions and 233 deletions
+10 -2
View File
@@ -224,7 +224,7 @@ func (vss ValidatorStubsByPower) Swap(i, j int) {
// Functions for transitioning the consensus state
func startTestRound(ctx context.Context, cs *State, height int64, round int32) {
cs.enterNewRound(height, round)
cs.enterNewRound(ctx, height, round)
cs.startRoutines(ctx, 0)
}
@@ -467,7 +467,15 @@ func newStateWithConfigAndBlockStore(
}
blockExec := sm.NewBlockExecutor(stateStore, logger, proxyAppConnCon, mempool, evpool, blockStore)
cs := NewState(logger.With("module", "consensus"), thisConfig.Consensus, state, blockExec, blockStore, mempool, evpool)
cs := NewState(ctx,
logger.With("module", "consensus"),
thisConfig.Consensus,
state,
blockExec,
blockStore,
mempool,
evpool,
)
cs.SetPrivValidator(pv)
eventBus := eventbus.NewDefault(logger.With("module", "events"))