Skip to content

Commit

Permalink
chore: run golangci-lint run ./... --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jtieri committed Sep 5, 2024
1 parent acc9b04 commit a3dfd14
Show file tree
Hide file tree
Showing 108 changed files with 552 additions and 506 deletions.
2 changes: 1 addition & 1 deletion blockdb/collect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestCollector_Collect(t *testing.T) {
savedHeights = append(savedHeights, int(height))
savedTxs = append(savedTxs, txs)
}
atomic.SwapInt64(&currentHeight, int64(height))
atomic.SwapInt64(&currentHeight, height)
return nil
})

Expand Down
6 changes: 4 additions & 2 deletions blockdb/messages_view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ import (
"path/filepath"
"testing"

"cosmossdk.io/math"
"github.com/cosmos/cosmos-sdk/types"
"github.com/strangelove-ventures/interchaintest/v8"
"github.com/strangelove-ventures/interchaintest/v8/ibc"
"github.com/strangelove-ventures/interchaintest/v8/relayer"
"github.com/strangelove-ventures/interchaintest/v8/testreporter"
"github.com/strangelove-ventures/interchaintest/v8/testutil"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"

"cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/types"
)

func TestMessagesView(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion blockdb/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package blockdb

import (
"context"
_ "embed"
"encoding/json"
"strings"
"testing"
"time"

"github.com/stretchr/testify/require"

_ "embed"
)

//go:embed testdata/sample_txs.json
Expand Down
2 changes: 1 addition & 1 deletion blockdb/tui/presenter/cosmos_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (msg CosmosMessage) Height() string { return strconv.FormatInt(msg.Result.H
// Index is the message's ordered position within the tx.
func (msg CosmosMessage) Index() string { return strconv.Itoa(msg.Result.Index) }

// Type is a URI for the proto definition, e.g. /ibc.core.client.v1.MsgCreateClient
// Type is a URI for the proto definition, e.g. /ibc.core.client.v1.MsgCreateClient.
func (msg CosmosMessage) Type() string { return msg.Result.Type }

func (msg CosmosMessage) ClientChain() string { return msg.Result.ClientChainID.String }
Expand Down
8 changes: 5 additions & 3 deletions chain/cosmos/08-wasm-types/client_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package types

import (
storetypes "cosmossdk.io/store/types"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"

clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" // nolint:staticcheck
"github.com/cosmos/ibc-go/v8/modules/core/exported"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
)

var _ exported.ClientState = (*ClientState)(nil)
Expand Down Expand Up @@ -86,7 +88,7 @@ func (c ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec
return true
}

// UpdateStateOnMisbehaviour should perform appropriate state changes on a client state given that misbehaviour has been detected and verified
// UpdateStateOnMisbehaviour should perform appropriate state changes on a client state given that misbehaviour has been detected and verified.
func (c ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) {
}

Expand Down
4 changes: 2 additions & 2 deletions chain/cosmos/08-wasm-types/codec.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package types

import (
"github.com/cosmos/ibc-go/v8/modules/core/exported"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"

"github.com/cosmos/ibc-go/v8/modules/core/exported"
)

// RegisterInterfaces registers the tendermint concrete client-related
Expand Down
8 changes: 4 additions & 4 deletions chain/cosmos/08-wasm-types/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package types
import (
"encoding/json"

// grpc "github.com/cosmos/gogoproto/grpc".
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/types/module"

// grpc "github.com/cosmos/gogoproto/grpc"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
)

var _ module.AppModuleBasic = AppModuleBasic{}
Expand Down
4 changes: 2 additions & 2 deletions chain/cosmos/08-wasm-types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ func NewMsgStoreCode(signer string, code []byte) *MsgStoreCode {
}
}

// ValidateBasic implements sdk.Msg
// ValidateBasic implements sdk.Msg.
func (m MsgStoreCode) ValidateBasic() error {
return nil
}

// GetSigners implements sdk.Msg
// GetSigners implements sdk.Msg.
func (m MsgStoreCode) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(m.Signer)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions chain/cosmos/account_retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import (
"fmt"
"strconv"

authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

grpc "google.golang.org/grpc"
"google.golang.org/grpc/metadata"

"github.com/cosmos/cosmos-sdk/client"
sdk "github.com/cosmos/cosmos-sdk/types"
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions chain/cosmos/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
"errors"
"strings"

"github.com/cosmos/cosmos-sdk/types/bech32"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/bech32"
)

// AccAddressFromBech32 creates an AccAddress from a Bech32 string.
Expand Down
7 changes: 3 additions & 4 deletions chain/cosmos/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ import (
"testing"
"time"

"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v8/testutil"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
"github.com/strangelove-ventures/interchaintest/v8/dockerutil"
"github.com/strangelove-ventures/interchaintest/v8/testutil"
)

type ClientContextOpt func(clientContext client.Context) client.Context
Expand Down Expand Up @@ -216,13 +217,11 @@ func BroadcastTx(ctx context.Context, broadcaster *Broadcaster, broadcastingUser
err = testutil.WaitForCondition(time.Second*30, time.Second*5, func() (bool, error) {
var err error
txBytes, err = broadcaster.GetTxResponseBytes(ctx, broadcastingUser)

if err != nil {
return false, nil
}
return true, nil
})

if err != nil {
return sdk.TxResponse{}, err
}
Expand Down
Loading

0 comments on commit a3dfd14

Please sign in to comment.