Skip to content

Commit

Permalink
pass events from cached ctx to main ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
faneaatiku committed Jun 22, 2024
1 parent 494ddd7 commit acabe45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bzeutils/safe_ctx_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ func applyFunc(ctx sdk.Context, f func(ctx sdk.Context) error, logFunc func(stri
} else {
// no error, write the output of f
write()
//cachedCtx has another instance of EventManager. We need to take events from it and add them to the main ctx
ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events())
}
return err
}
Expand Down

0 comments on commit acabe45

Please sign in to comment.