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
+2 -2
View File
@@ -275,7 +275,7 @@ func (r *Reactor) SwitchToConsensus(ctx context.Context, state sm.State, skipWAL
// NOTE: The line below causes broadcastNewRoundStepRoutine() to broadcast a
// NewRoundStepMessage.
r.state.updateToState(state)
r.state.updateToState(ctx, state)
r.mtx.Lock()
r.waitSync = false
@@ -299,7 +299,7 @@ conR:
}
d := types.EventDataBlockSyncStatus{Complete: true, Height: state.LastBlockHeight}
if err := r.eventBus.PublishEventBlockSyncStatus(d); err != nil {
if err := r.eventBus.PublishEventBlockSyncStatus(ctx, d); err != nil {
r.Logger.Error("failed to emit the blocksync complete event", "err", err)
}
}