Skip to content

Commit

Permalink
Merge PR #5622: Track proposal handler events on success
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Feb 7, 2020
1 parent 94c1a10 commit 4333b19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ respectively.

### Bug Fixes

* (x/gov) [\#5622](https://github.com/cosmos/cosmos-sdk/pull/5622) Track any events emitted from a proposal's handler upon successful execution.
* (x/bank) [\#5531](https://github.com/cosmos/cosmos-sdk/issues/5531) Added missing amount event to MsgMultiSend, emitted for each output.

## [v0.37.6] - 2020-01-21
Expand Down
6 changes: 6 additions & 0 deletions x/gov/endblocker.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ func EndBlocker(ctx sdk.Context, keeper Keeper) {
tagValue = types.AttributeValueProposalPassed
logMsg = "passed"

// The cached context is created with a new EventManager. However, since
// the proposal handler execution was successful, we want to track/keep
// any events emitted, so we re-emit to "merge" the events into the
// original Context's EventManager.
ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events())

// write state to the underlying multi-store
writeCache()
} else {
Expand Down

0 comments on commit 4333b19

Please sign in to comment.