From dd56896441f9741cec16ec004e43a64e4832e177 Mon Sep 17 00:00:00 2001 From: skosito Date: Thu, 13 Jun 2024 20:50:39 +0200 Subject: [PATCH] PR comments --- x/crosschain/keeper/cctx_gateway_observers.go | 1 - x/crosschain/keeper/cctx_gateway_zevm.go | 1 - x/crosschain/keeper/cctx_orchestrator_validate_outbound.go | 2 +- x/crosschain/keeper/initiate_outbound.go | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x/crosschain/keeper/cctx_gateway_observers.go b/x/crosschain/keeper/cctx_gateway_observers.go index 556d242214..e9603b3903 100644 --- a/x/crosschain/keeper/cctx_gateway_observers.go +++ b/x/crosschain/keeper/cctx_gateway_observers.go @@ -55,6 +55,5 @@ func (c CCTXGatewayObservers) InitiateOutbound( return types.CctxStatus_Aborted } commit() - cctx.SetPendingOutbound("") return types.CctxStatus_PendingOutbound } diff --git a/x/crosschain/keeper/cctx_gateway_zevm.go b/x/crosschain/keeper/cctx_gateway_zevm.go index 5b61990215..c6cadf7f8f 100644 --- a/x/crosschain/keeper/cctx_gateway_zevm.go +++ b/x/crosschain/keeper/cctx_gateway_zevm.go @@ -29,7 +29,6 @@ func (c CCTXGatewayZEVM) InitiateOutbound(ctx sdk.Context, cctx *types.CrossChai return types.CctxStatus_Aborted } - cctx.SetPendingOutbound("") newCCTXStatus = c.crosschainKeeper.ValidateOutboundZEVM(ctx, cctx, err, isContractReverted) if newCCTXStatus == types.CctxStatus_OutboundMined { commit() diff --git a/x/crosschain/keeper/cctx_orchestrator_validate_outbound.go b/x/crosschain/keeper/cctx_orchestrator_validate_outbound.go index 083eb62ccb..16b61a3a0a 100644 --- a/x/crosschain/keeper/cctx_orchestrator_validate_outbound.go +++ b/x/crosschain/keeper/cctx_orchestrator_validate_outbound.go @@ -155,7 +155,7 @@ func (k Keeper) validateFailedOutbound( cctx *types.CrossChainTx, oldStatus types.CctxStatus, revertMsg string, - inputAmount math.Uint, // TODO: find different way for this + inputAmount math.Uint, ) error { switch oldStatus { case types.CctxStatus_PendingOutbound: diff --git a/x/crosschain/keeper/initiate_outbound.go b/x/crosschain/keeper/initiate_outbound.go index 8174f6ec4e..dc3fcf4c24 100644 --- a/x/crosschain/keeper/initiate_outbound.go +++ b/x/crosschain/keeper/initiate_outbound.go @@ -35,5 +35,6 @@ func (k Keeper) InitiateOutbound(ctx sdk.Context, cctx *types.CrossChainTx) (typ ) } + cctx.SetPendingOutbound("") return cctxGateway.InitiateOutbound(ctx, cctx), nil }