From b031671bc257ee5b901089c78615f4c217ad240a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 19 Jun 2024 18:16:50 +0200 Subject: [PATCH] Lint --- e2e/e2etests/helper_bitcoin.go | 7 ++++++- e2e/e2etests/test_bitcoin_deposit_refund.go | 1 + e2e/e2etests/test_bitcoin_withdraw_multiple.go | 1 + e2e/utils/zetacore.go | 11 +++++++++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/e2e/e2etests/helper_bitcoin.go b/e2e/e2etests/helper_bitcoin.go index 220b7040bd..64d779785d 100644 --- a/e2e/e2etests/helper_bitcoin.go +++ b/e2e/e2etests/helper_bitcoin.go @@ -76,7 +76,12 @@ func withdrawBTCZRC20(r *runner.E2ERunner, to btcutil.Address, amount *big.Int) // get cctx and check status cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, receipt.TxHash.Hex(), r.CctxClient, r.Logger, r.CctxTimeout) - require.Equal(r, crosschaintypes.CctxStatus_OutboundMined, cctx.CctxStatus.Status, "cctx status is not OutboundMined") + require.Equal( + r, + crosschaintypes.CctxStatus_OutboundMined, + cctx.CctxStatus.Status, + "cctx status is not OutboundMined", + ) // get bitcoin tx according to the outTxHash in cctx outTxHash := cctx.GetCurrentOutboundParam().Hash diff --git a/e2e/e2etests/test_bitcoin_deposit_refund.go b/e2e/e2etests/test_bitcoin_deposit_refund.go index 92cddcd74b..4afdea7088 100644 --- a/e2e/e2etests/test_bitcoin_deposit_refund.go +++ b/e2e/e2etests/test_bitcoin_deposit_refund.go @@ -6,6 +6,7 @@ import ( "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" "github.com/zeta-chain/zetacore/x/crosschain/types" diff --git a/e2e/e2etests/test_bitcoin_withdraw_multiple.go b/e2e/e2etests/test_bitcoin_withdraw_multiple.go index 2bb812f257..a1f201d8db 100644 --- a/e2e/e2etests/test_bitcoin_withdraw_multiple.go +++ b/e2e/e2etests/test_bitcoin_withdraw_multiple.go @@ -6,6 +6,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/pkg/chains" ) diff --git a/e2e/utils/zetacore.go b/e2e/utils/zetacore.go index 0504dc1481..26b647a53e 100644 --- a/e2e/utils/zetacore.go +++ b/e2e/utils/zetacore.go @@ -8,9 +8,10 @@ import ( rpchttp "github.com/cometbft/cometbft/rpc/client/http" coretypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/stretchr/testify/require" - crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" ) type CCTXClient = crosschaintypes.QueryClient @@ -192,7 +193,13 @@ type waitConfig struct { } // WaitCctxByInboundHash waits until cctx appears by inbound hash. -func WaitCctxByInboundHash(ctx context.Context, t require.TestingT, hash string, c CCTXClient, opts ...WaitOpts) []crosschaintypes.CrossChainTx { +func WaitCctxByInboundHash( + ctx context.Context, + t require.TestingT, + hash string, + c CCTXClient, + opts ...WaitOpts, +) []crosschaintypes.CrossChainTx { const tick = time.Millisecond * 200 if _, hasDeadline := ctx.Deadline(); !hasDeadline {