Skip to content

Commit

Permalink
unrelated lint
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Dec 6, 2024
1 parent df70c65 commit d230ee2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion schema/indexer/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/v2/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
21 changes: 1 addition & 20 deletions tests/integration/v2/evidence/infraction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"context"
"encoding/hex"
"fmt"
"testing"
"time"

Expand All @@ -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"
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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
}
}

0 comments on commit d230ee2

Please sign in to comment.