diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 5a86d9c83d51..65c44d5b815b 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -706,7 +706,7 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context func (app *BaseApp) preBlock(req *abci.FinalizeBlockRequest) ([]abci.Event, error) { var events []abci.Event if app.preBlocker != nil { - ctx := app.finalizeBlockState.Context() + ctx := app.finalizeBlockState.Context().WithEventManager(sdk.NewEventManager()) if err := app.preBlocker(ctx, req); err != nil { return nil, err } diff --git a/types/module/module.go b/types/module/module.go index 7d06c7ce2109..66901bb32da9 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -714,7 +714,6 @@ func (m Manager) RunMigrations(ctx context.Context, cfg Configurator, fromVM app // It takes the current context as a parameter and returns a boolean value // indicating whether the migration was successfully executed or not. func (m *Manager) PreBlock(ctx sdk.Context) error { - ctx = ctx.WithEventManager(sdk.NewEventManager()) for _, moduleName := range m.OrderPreBlockers { if module, ok := m.Modules[moduleName].(appmodule.HasPreBlocker); ok { if err := module.PreBlock(ctx); err != nil {