fix: append Log in tx post processing response (#1088)

* fix post processing log

* update changelog
This commit is contained in:
Thomas Nguy 2022-05-19 19:11:26 +09:00 committed by GitHub
parent d359cbd9c9
commit 9edc87d114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes ### Bug Fixes
* (rpc) [tharsis#1082](https://github.com/tharsis/ethermint/pull/1082) fix gas price returned in getTransaction api. * (rpc) [tharsis#1082](https://github.com/tharsis/ethermint/pull/1082) fix gas price returned in getTransaction api.
* (evm) [tharsis#1088](https://github.com/tharsis/ethermint/pull/1088) Fix ability to append log in tx post processing.
## [v0.15.0] - 2022-05-09 ## [v0.15.0] - 2022-05-09

View File

@ -271,6 +271,8 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
} else if commit != nil { } else if commit != nil {
// PostTxProcessing is successful, commit the tmpCtx // PostTxProcessing is successful, commit the tmpCtx
commit() commit()
// Since the post processing can alter the log, we need to update the result
res.Logs = types.NewLogsFromEth(receipt.Logs)
ctx.EventManager().EmitEvents(tmpCtx.EventManager().Events()) ctx.EventManager().EmitEvents(tmpCtx.EventManager().Events())
} }
} }