From 5eb1127c101a7528f152222f94b8e22e72205ee1 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Wed, 27 Nov 2024 19:48:52 -0500 Subject: [PATCH] update usage for IsTerminalStatus function --- e2e/utils/zetacore.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/e2e/utils/zetacore.go b/e2e/utils/zetacore.go index bf01d79ec8..8f169688b4 100644 --- a/e2e/utils/zetacore.go +++ b/e2e/utils/zetacore.go @@ -113,7 +113,7 @@ func WaitCctxsMinedByInboundHash( allFound := true for j, cctx := range res.CrossChainTxs { cctx := cctx - if !IsTerminalStatus(cctx.CctxStatus.Status) { + if !cctx.CctxStatus.Status.IsTerminalStatus() { // prevent spamming logs if i%20 == 0 { logger.Info( @@ -170,7 +170,7 @@ func WaitCCTXMinedByIndex( } cctx := res.CrossChainTx - if !IsTerminalStatus(cctx.CctxStatus.Status) { + if !cctx.CctxStatus.Status.IsTerminalStatus() { // prevent spamming logs if i%20 == 0 { logger.Info( @@ -299,12 +299,6 @@ func WaitCctxByInboundHash( } } -func IsTerminalStatus(status crosschaintypes.CctxStatus) bool { - return status == crosschaintypes.CctxStatus_OutboundMined || - status == crosschaintypes.CctxStatus_Aborted || - status == crosschaintypes.CctxStatus_Reverted -} - // WaitForBlockHeight waits until the block height reaches the given height func WaitForBlockHeight( ctx context.Context,