From d97f7548dd5f8da8adec72f7c23033d79fa98102 Mon Sep 17 00:00:00 2001 From: beer-1 Date: Tue, 5 Nov 2024 13:59:12 +0900 Subject: [PATCH] remove unnecessary context branching --- x/ibc-hooks/move-hooks/receive.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/x/ibc-hooks/move-hooks/receive.go b/x/ibc-hooks/move-hooks/receive.go index 335314ce..5d18b9d0 100644 --- a/x/ibc-hooks/move-hooks/receive.go +++ b/x/ibc-hooks/move-hooks/receive.go @@ -124,16 +124,10 @@ func (h MoveHooks) execMsg(ctx sdk.Context, msg *movetypes.MsgExecute) (*movetyp } moveMsgServer := movekeeper.NewMsgServerImpl(h.moveKeeper) - - // use cache context to prevent state changes if the message execution fails - cacheCtx, write := ctx.CacheContext() - res, err := moveMsgServer.Execute(cacheCtx, msg) + res, err := moveMsgServer.Execute(ctx, msg) if err != nil { return nil, err } - // write the cache context only if the message execution was successful - write() - return res, nil }