From 309358e1bb9b5091793055b4679c6b1802f136bb Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 31 Jul 2024 23:32:38 -0400 Subject: [PATCH] add changelog --- changelog.md | 4 ++++ .../zetacored_tx_fungible_update-gateway-contract.md | 2 +- x/crosschain/keeper/msg_server_vote_outbound_tx.go | 11 ++--------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/changelog.md b/changelog.md index ae097c3163..1b149729c0 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,10 @@ * [2578](https://github.com/zeta-chain/node/pull/2578) - Add Gateway address in protocol contract list +### Refactor + +* [2615](https://github.com/zeta-chain/node/pull/2615) - Refactor cleanup of outbound trackers + ## v19.0.0 ### Breaking Changes diff --git a/docs/cli/zetacored/zetacored_tx_fungible_update-gateway-contract.md b/docs/cli/zetacored/zetacored_tx_fungible_update-gateway-contract.md index d75877c440..0b4217c65b 100644 --- a/docs/cli/zetacored/zetacored_tx_fungible_update-gateway-contract.md +++ b/docs/cli/zetacored/zetacored_tx_fungible_update-gateway-contract.md @@ -3,7 +3,7 @@ Broadcast message UpdateGatewayContract to update the gateway contract address ``` -zetacored tx fungible update-gateway-contract [contract-address] [flags] +zetacored tx fungible update-gateway-contract [contract-address] [flags] ``` ### Options diff --git a/x/crosschain/keeper/msg_server_vote_outbound_tx.go b/x/crosschain/keeper/msg_server_vote_outbound_tx.go index 000c148414..3da780ccc1 100644 --- a/x/crosschain/keeper/msg_server_vote_outbound_tx.go +++ b/x/crosschain/keeper/msg_server_vote_outbound_tx.go @@ -91,9 +91,6 @@ func (k msgServer) VoteOutbound( } // Set the finalized ballot to the current outbound params. - // The two cases are possible - // 1. The outbound tx is successful, and this is the only ballot that is set - // 2. Revert TX is created, in which case the ballot for the revert TX would be set only when that ballot is finalized. cctx.SetOutboundBallotIndex(ballotIndex) // If ballot is successful, the value received should be the out tx amount. err = cctx.AddOutbound(ctx, *msg, ballot.BallotStatus) @@ -203,13 +200,9 @@ SaveOutbound saves the outbound transaction.It does the following things in one func (k Keeper) SaveOutbound(ctx sdk.Context, cctx *types.CrossChainTx) { // #nosec G115 always in range for _, outboundParams := range cctx.OutboundParams { - k.GetObserverKeeper().RemoveFromPendingNonces(ctx, outboundParams.TssPubkey, outboundParams.ReceiverChainId, int64(outboundParams.TssNonce)) + k.GetObserverKeeper(). + RemoveFromPendingNonces(ctx, outboundParams.TssPubkey, outboundParams.ReceiverChainId, int64(outboundParams.TssNonce)) k.RemoveOutboundTrackerFromStore(ctx, outboundParams.ReceiverChainId, outboundParams.TssNonce) - ctx.Logger().With( - "voteOutboundID", voteOutboundID, - "trackerIndex", getOutboundTrackerIndex(outboundParams.ReceiverChainId, outboundParams.TssNonce), - "blockHeight", ctx.BlockHeight(), - ).Info("Remove tracker") } // This should set nonce to cctx only if a new revert is created.