Merge PR #5622: Track proposal handler events on success
This commit is contained in:
parent
dba80caec0
commit
cd9b2d450b
|
@ -56,13 +56,14 @@ 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
|
||||
and is only flushed to disk if it is a snapshot version. During `Query` of the root multi-store, if the request height
|
||||
is the latest height, we'll use the store's `lastCommitInfo`. Otherwise, we fetch `commitInfo` from disk.
|
||||
* (x/bank) [\#5531](https://github.com/cosmos/cosmos-sdk/issues/5531) Added missing amount event to MsgMultiSend, emitted for each output.
|
||||
* (client) [\#5618](https://github.com/cosmos/cosmos-sdk/pull/5618) Fix crash on the client when the verifier is not set.
|
||||
* (client) [\#5618](https://github.com/cosmos/cosmos-sdk/pull/5618) Fix crash on the client when the verifier is not set.
|
||||
|
||||
### State Machine Breaking
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue