Skip to content

Commit

Permalink
set CCTX inbound finalized height irrespective of receiver chain
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Aug 1, 2023
1 parent 13d3938 commit acccb0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func (k msgServer) VoteOnObservedInboundTx(goCtx context.Context, msg *types.Msg
cctx := k.CreateNewCCTX(ctx, msg, index, types.CctxStatus_PendingInbound, observationChain, receiverChain)
defer func() {
EmitEventInboundFinalized(ctx, &cctx)
cctx.InboundTxParams.InboundTxFinalizedZetaHeight = uint64(ctx.BlockHeight())
k.SetCctxAndNonceToCctxAndInTxHashToCctx(ctx, cctx)
}()
// FinalizeInbound updates CCTX Prices and Nonce
Expand Down Expand Up @@ -134,7 +135,6 @@ func (k msgServer) VoteOnObservedInboundTx(goCtx context.Context, msg *types.Msg
} else { // Cross Chain SWAP
tmpCtx, commit := ctx.CacheContext()
err = func() error {
cctx.InboundTxParams.InboundTxFinalizedZetaHeight = uint64(ctx.BlockHeader().Height)
err := k.PayGasInZetaAndUpdateCctx(tmpCtx, receiverChain.ChainId, &cctx)
if err != nil {
return err
Expand Down

0 comments on commit acccb0c

Please sign in to comment.