From d230ee266baaead33a9a81386aa8acbe2deb5039 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 6 Dec 2024 13:17:13 +0100 Subject: [PATCH] unrelated lint --- schema/indexer/start.go | 2 +- tests/integration/v2/app.go | 2 ++ .../v2/evidence/infraction_test.go | 21 +------------------ 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/schema/indexer/start.go b/schema/indexer/start.go index f675c2916026..66fbdb52a6d3 100644 --- a/schema/indexer/start.go +++ b/schema/indexer/start.go @@ -120,7 +120,7 @@ func StartIndexing(opts IndexingOptions) (IndexingTarget, error) { targetCfg.Config, err = unmarshalIndexerCustomConfig(targetCfg.Config, init.ConfigType) if err != nil { - return IndexingTarget{}, fmt.Errorf("failed to unmarshal indexer config for target %q: %v", targetName, err) + return IndexingTarget{}, fmt.Errorf("failed to unmarshal indexer config for target %q: %v", targetName, err) //nolint:errorlint // we support go 1.12, so no error wrapping } initRes, err := init.InitFunc(InitParams{ diff --git a/tests/integration/v2/app.go b/tests/integration/v2/app.go index 8eba29665cf3..72a4873cba6b 100644 --- a/tests/integration/v2/app.go +++ b/tests/integration/v2/app.go @@ -445,6 +445,8 @@ func (a *App) SignCheckDeliver( // It required the context to have the integration context. // a new state is committed if the option WithAutomaticCommit is set in options. func (app *App) RunMsg(t *testing.T, ctx context.Context, handler handler, option ...Option) (resp transaction.Msg, err error) { + t.Helper() + // set options cfg := &RunMsgConfig{} for _, opt := range option { diff --git a/tests/integration/v2/evidence/infraction_test.go b/tests/integration/v2/evidence/infraction_test.go index 16cd31f4e83d..351b2f3ea9be 100644 --- a/tests/integration/v2/evidence/infraction_test.go +++ b/tests/integration/v2/evidence/infraction_test.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "encoding/hex" - "fmt" "testing" "time" @@ -25,7 +24,6 @@ import ( _ "cosmossdk.io/x/evidence" // import as blank for app wiring "cosmossdk.io/x/evidence/exported" "cosmossdk.io/x/evidence/keeper" - evidencetypes "cosmossdk.io/x/evidence/types" minttypes "cosmossdk.io/x/mint/types" _ "cosmossdk.io/x/slashing" // import as blank for app wiring slashingkeeper "cosmossdk.io/x/slashing/keeper" @@ -251,6 +249,7 @@ func TestHandleDoubleSign_TooOld(t *testing.T) { require.NotNil(t, f.consensusKeeper.ParamsStore) require.NoError(t, f.consensusKeeper.ParamsStore.Set(ctx, *simtestutil.DefaultConsensusParams)) cp, err := f.consensusKeeper.ParamsStore.Get(ctx) + require.NoError(t, err) ctx = integration.SetCometInfo(ctx, nci) ctx = integration.SetHeaderInfo(ctx, header.Info{ @@ -412,21 +411,3 @@ func newPubKey(pk string) (res cryptotypes.PubKey) { return pubkey } - -func testEquivocationHandler(_ interface{}) evidencetypes.Handler { - return func(ctx context.Context, e exported.Evidence) error { - if err := e.ValidateBasic(); err != nil { - return err - } - - ee, ok := e.(*evidencetypes.Equivocation) - if !ok { - return fmt.Errorf("unexpected evidence type: %T", e) - } - if ee.Height%2 == 0 { - return fmt.Errorf("unexpected even evidence height: %d", ee.Height) - } - - return nil - } -}