From 87b971a016d5f2bde6be5b3862515b53864d6487 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 19 Dec 2024 17:08:31 +0100 Subject: [PATCH] linting --- server/v2/cometbft/utils.go | 3 +-- tests/integration/v2/accounts/lockup/utils.go | 2 +- tests/integration/v2/app.go | 8 ++++---- tests/integration/v2/staking/common_test.go | 6 ++---- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/server/v2/cometbft/utils.go b/server/v2/cometbft/utils.go index 700a84b247ac..b5c9b76d6f4f 100644 --- a/server/v2/cometbft/utils.go +++ b/server/v2/cometbft/utils.go @@ -15,7 +15,6 @@ import ( cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cryptoenc "github.com/cometbft/cometbft/crypto/encoding" protoio "github.com/cosmos/gogoproto/io" - "github.com/cosmos/gogoproto/proto" gogoproto "github.com/cosmos/gogoproto/proto" gogoany "github.com/cosmos/gogoproto/types/any" "google.golang.org/grpc/codes" @@ -516,7 +515,7 @@ func ValidateVoteExtensions[T transaction.Tx]( return nil } - marshalDelimitedFn := func(msg proto.Message) ([]byte, error) { + marshalDelimitedFn := func(msg gogoproto.Message) ([]byte, error) { var buf bytes.Buffer if err := protoio.NewDelimitedWriter(&buf).WriteMsg(msg); err != nil { return nil, err diff --git a/tests/integration/v2/accounts/lockup/utils.go b/tests/integration/v2/accounts/lockup/utils.go index efe329a8f092..e5e50c21682c 100644 --- a/tests/integration/v2/accounts/lockup/utils.go +++ b/tests/integration/v2/accounts/lockup/utils.go @@ -247,7 +247,7 @@ func (s *IntegrationTestSuite) setupStakingParams(ctx context.Context, sk *staki require.NoError(s.T(), err) // update unbonding time - params.UnbondingTime = time.Duration(time.Second * 10) + params.UnbondingTime = time.Second * 10 err = sk.Params.Set(ctx, params) require.NoError(s.T(), err) } diff --git a/tests/integration/v2/app.go b/tests/integration/v2/app.go index 4a3728c822d2..77302dc8bafa 100644 --- a/tests/integration/v2/app.go +++ b/tests/integration/v2/app.go @@ -104,8 +104,8 @@ type StartupConfig struct { GasService gas.Service } -func DefaultStartUpConfig(t testing.TB) StartupConfig { - t.Helper() +func DefaultStartUpConfig(tb testing.TB) StartupConfig { + tb.Helper() priv := secp256k1.GenPrivKey() ba := authtypes.NewBaseAccount( @@ -120,8 +120,8 @@ func DefaultStartUpConfig(t testing.TB) StartupConfig { sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000000000)), ), } - homedir := t.TempDir() - t.Logf("generated integration test app config; HomeDir=%s", homedir) + homedir := tb.TempDir() + tb.Logf("generated integration test app config; HomeDir=%s", homedir) return StartupConfig{ ValidatorSet: CreateRandomValidatorSet, GenesisBehavior: Genesis_COMMIT, diff --git a/tests/integration/v2/staking/common_test.go b/tests/integration/v2/staking/common_test.go index 9880aa48b975..fa4b635e0376 100644 --- a/tests/integration/v2/staking/common_test.go +++ b/tests/integration/v2/staking/common_test.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" _ "cosmossdk.io/x/accounts" // import as blank for app wiring _ "cosmossdk.io/x/bank" // import as blank for app wiring bankkeeper "cosmossdk.io/x/bank/keeper" @@ -45,9 +44,8 @@ var ( type fixture struct { app *integration.App - ctx context.Context - cdc codec.Codec - keys map[string]*storetypes.KVStoreKey + ctx context.Context + cdc codec.Codec queryClient stakingkeeper.Querier