evm: re-emit the cosmos events from cache context (#415)

Closes: #414
This commit is contained in:
yihuang 2021-08-09 17:38:43 +08:00 committed by GitHub
parent 75b7f56b00
commit 73c2f8e529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,6 +169,8 @@ func (k *Keeper) ApplyTransaction(tx *ethtypes.Transaction) (*types.MsgEthereumT
// Commit and switch to committed context
if !res.Failed() {
// keep the cosmos events emitted in the cache context
k.committedCtx.EventManager().EmitEvents(k.ctx.EventManager().Events())
commit()
}