fix: return anteEvents when postHandler fail (#14448)

This commit is contained in:
yihuang 2022-12-31 19:45:43 +08:00 committed by GitHub
parent ebfd057716
commit 9a8b65ba27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -232,6 +232,7 @@ extension interfaces. `module.Manager.Modules` is now of type `map[string]interf
* (snapshot) [#13400](https://github.com/cosmos/cosmos-sdk/pull/13400) Fix snapshot checksum issue in golang 1.19.
* (server) [#13778](https://github.com/cosmos/cosmos-sdk/pull/13778) Set Cosmos SDK default endpoints to localhost to avoid unknown exposure of endpoints.
* (x/auth) [#13877](https://github.com/cosmos/cosmos-sdk/pull/13877) Handle missing account numbers during `InitGenesis`.
* (ante) [#14448](https://github.com/cosmos/cosmos-sdk/pull/14448) Return anteEvents when postHandler fail.
### Deprecated

View File

@ -730,7 +730,7 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re
newCtx, err := app.postHandler(postCtx, tx, mode == runTxModeSimulate)
if err != nil {
return gInfo, nil, nil, priority, err
return gInfo, nil, anteEvents, priority, err
}
result.Events = append(result.Events, newCtx.EventManager().ABCIEvents()...)