Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update pending nonces when aborting a cctx through MsgAbortStuckCCTX #3230

Merged
merged 14 commits into from
Dec 9, 2024
Merged
Prev Previous commit
Next Next commit
update comments for SetCctxAndNonceToCctxAndInboundHashToCctx
kingpinXD committed Nov 28, 2024
commit c50a6ea041ead47017e2734b973366032ba92683
2 changes: 1 addition & 1 deletion x/crosschain/keeper/cctx.go
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ func (k Keeper) SetNonceToCCTXMapping(

// SetCrossChainTx set a specific cctx in the store from its index
func (k Keeper) SetCrossChainTx(ctx sdk.Context, cctx types.CrossChainTx) {
// only set the update timestamp if the block height is >0 to allow
// only set the updated timestamp if the block height is >0 to allow
// for a genesis import
if cctx.CctxStatus != nil && ctx.BlockHeight() > 0 {
cctx.CctxStatus.LastUpdateTimestamp = ctx.BlockHeader().Time.Unix()
3 changes: 2 additions & 1 deletion x/crosschain/keeper/msg_server_abort_stuck_cctx.go
Original file line number Diff line number Diff line change
@@ -43,7 +43,8 @@ func (k msgServer) AbortStuckCCTX(
// update the status
cctx.CctxStatus.UpdateStatusAndErrorMessages(types.CctxStatus_Aborted, AbortMessage, "")

// Save out outbound, we do not need to provide the tss-pubkey as NonceToCctx is not updated
// Save out outbound,
// We do not need to provide the tss-pubkey as NonceToCctx is not updated / New outbound is not added
k.SaveOutbound(ctx, &cctx, "")

return &types.MsgAbortStuckCCTXResponse{}, nil