From 5147d1ca906b29827e63eeee7fac792d092005eb Mon Sep 17 00:00:00 2001 From: HuangYi Date: Wed, 25 Oct 2023 16:07:15 +0800 Subject: [PATCH] fix cyclic import --- types/chain_id_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/types/chain_id_test.go b/types/chain_id_test.go index 141c5141d25f..b98b3c36bc7f 100644 --- a/types/chain_id_test.go +++ b/types/chain_id_test.go @@ -1,10 +1,11 @@ -package types +package types_test import ( _ "embed" "strings" "testing" + sdk "github.com/cosmos/cosmos-sdk/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/stretchr/testify/require" ) @@ -94,7 +95,7 @@ func TestParseChainIDFromGenesis(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - chain_id, err := ParseChainIDFromGenesis(strings.NewReader(tc.json)) + chain_id, err := sdk.ParseChainIDFromGenesis(strings.NewReader(tc.json)) if tc.expChainID == "" { require.Error(t, err) require.Contains(t, err.Error(), tc.expError) @@ -112,7 +113,7 @@ func BenchmarkParseChainID(b *testing.B) { b.Run("new", func(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - chainId, err := ParseChainIDFromGenesis(strings.NewReader(BenchmarkGenesis)) + chainId, err := sdk.ParseChainIDFromGenesis(strings.NewReader(BenchmarkGenesis)) require.NoError(b, err) require.Equal(b, expChainID, chainId) }