From 1e1fd552d8dec46fc51b633560074ea76386293c Mon Sep 17 00:00:00 2001 From: Calvin Lau Date: Fri, 8 Oct 2021 10:35:55 +0800 Subject: [PATCH] Problem: processEthereumEvent does not persist hooks emitted event Solution: Copy events from cached context to persistance storage --- module/x/gravity/keeper/ethereum_event_vote.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/x/gravity/keeper/ethereum_event_vote.go b/module/x/gravity/keeper/ethereum_event_vote.go index 4b005750e..9faba91a3 100644 --- a/module/x/gravity/keeper/ethereum_event_vote.go +++ b/module/x/gravity/keeper/ethereum_event_vote.go @@ -130,7 +130,8 @@ func (k Keeper) processEthereumEvent(ctx sdk.Context, event types.EthereumEvent) "nonce", fmt.Sprint(event.GetEventNonce()), ) } else { - commit() // persist transient storage + ctx.EventManager().EmitEvents(xCtx.EventManager().Events()) // copy events to original context + commit() // persist transient storage } }