From 73c2f8e529fdc31d55ca83d606863fb39a61df9e Mon Sep 17 00:00:00 2001 From: yihuang Date: Mon, 9 Aug 2021 17:38:43 +0800 Subject: [PATCH] evm: re-emit the cosmos events from cache context (#415) Closes: #414 --- x/evm/keeper/state_transition.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index bcadb43e..0319e015 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -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() }