fix(baseapp): preblock events are not emmitted correctly (backport #21444) (#21458)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2024-08-30 19:53:57 +00:00
committed by GitHub
co-authored by Facundo Medica Julien Robert
parent f2b1a522a5
commit 8c9152d9c6
3 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -707,7 +707,7 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context
func (app *BaseApp) preBlock(req *abci.RequestFinalizeBlock) ([]abci.Event, error) {
var events []abci.Event
if app.preBlocker != nil {
ctx := app.finalizeBlockState.Context()
ctx := app.finalizeBlockState.Context().WithEventManager(sdk.NewEventManager())
rsp, err := app.preBlocker(ctx, req)
if err != nil {
return nil, err