Skip to content

Commit

Permalink
Reemitting events from cache context in gov endblockers (cosmos#465)
Browse files Browse the repository at this point in the history
Co-authored-by: Dev Ojha <[email protected]>
  • Loading branch information
iboss-ptk and ValarDragon authored Jun 27, 2023
1 parent 9199153 commit 4c20864
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/gov/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) {

// write state to the underlying multi-store
writeCache()
// emit events from cache context manually
// required due to https://github.com/osmosis-labs/cosmos-sdk/pull/384 which makes `writeCache` omit emitting events
ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events())
} else {
proposal.Status = types.StatusFailed
tagValue = types.AttributeValueProposalFailed
Expand Down

0 comments on commit 4c20864

Please sign in to comment.