Merge PR #5622: Track proposal handler events on success
This commit is contained in:
@@ -56,6 +56,7 @@ and provided directly the IAVL store.
|
||||
|
||||
### 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.
|
||||
* (types) [\#5579](https://github.com/cosmos/cosmos-sdk/pull/5579) The IAVL `Store#Commit` method has been refactored to
|
||||
delete a flushed version if it is not a snapshot version. The root multi-store now keeps track of `commitInfo` instead
|
||||
of `types.CommitID`. During `Commit` of the root multi-store, `lastCommitInfo` is updated from the saved state
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user