Skip to content

Commit

Permalink
chore: linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan committed Dec 6, 2024
1 parent 2a56ea4 commit 7cb2628
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions modules/apps/27-interchain-accounts/controller/types/codec.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package types

import (
"cosmossdk.io/core/registry"
coreregistry "cosmossdk.io/core/registry"

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

// RegisterInterfaces registers the interchain accounts controller message types using the provided InterfaceRegistry
func RegisterInterfaces(registry registry.InterfaceRegistrar) {
func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) {
registry.RegisterImplementations(
(*sdk.Msg)(nil),
&MsgRegisterInterchainAccount{},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"

"cosmossdk.io/core/registry"
coreregistry "cosmossdk.io/core/registry"
banktypes "cosmossdk.io/x/bank/types"
stakingtypes "cosmossdk.io/x/staking/types"

Expand Down Expand Up @@ -48,15 +48,15 @@ func TestGeneratePacketData(t *testing.T) {
memo string
expectedPass bool
message string
registerInterfaceFn func(registry registry.InterfaceRegistrar)
registerInterfaceFn func(registry coreregistry.InterfaceRegistrar)
assertionFn func(t *testing.T, msgs []sdk.Msg)
}{
{
name: "packet data generation succeeds (MsgDelegate & MsgSend)",
memo: "",
expectedPass: true,
message: multiMsg,
registerInterfaceFn: func(registry registry.InterfaceRegistrar) {
registerInterfaceFn: func(registry coreregistry.InterfaceRegistrar) {
stakingtypes.RegisterInterfaces(registry)
banktypes.RegisterInterfaces(registry)
},
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/callbacks/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Conf

// ValidatorKeyProvider returns a function that generates a validator key
// Supported key types are those supported by Comet: ed25519, secp256k1, bls12-381
func (app *SimApp) ValidatorKeyProvider() runtime.KeyGenF {
func (*SimApp) ValidatorKeyProvider() runtime.KeyGenF {
return func() (cmtcrypto.PrivKey, error) {
return cmted25519.GenPrivKey(), nil
}
Expand Down
4 changes: 2 additions & 2 deletions modules/core/types/codec.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
"cosmossdk.io/core/registry"
coreregistry "cosmossdk.io/core/registry"

clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types"
connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types"
Expand All @@ -11,7 +11,7 @@ import (

// RegisterInterfaces registers ibc types against interfaces using the global InterfaceRegistry.
// Note: The localhost client is created by ibc core and thus requires explicit type registration.
func RegisterInterfaces(registry registry.InterfaceRegistrar) {
func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) {
clienttypes.RegisterInterfaces(registry)
connectiontypes.RegisterInterfaces(registry)
channeltypes.RegisterInterfaces(registry)
Expand Down
4 changes: 2 additions & 2 deletions modules/light-clients/07-tendermint/codec.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package tendermint

import (
"cosmossdk.io/core/registry"
coreregistry "cosmossdk.io/core/registry"

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

// RegisterInterfaces registers the tendermint concrete client-related
// implementations and interfaces.
func RegisterInterfaces(registry registry.InterfaceRegistrar) {
func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) {
registry.RegisterImplementations(
(*exported.ClientState)(nil),
&ClientState{},
Expand Down
6 changes: 3 additions & 3 deletions modules/light-clients/08-wasm/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"

"cosmossdk.io/core/appmodule"
"cosmossdk.io/core/registry"
coreregistry "cosmossdk.io/core/registry"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -41,11 +41,11 @@ func (AppModule) Name() string {
}

// RegisterLegacyAminoCodec performs a no-op. The Wasm client does not support amino.
func (AppModule) RegisterLegacyAminoCodec(registry.AminoRegistrar) {}
func (AppModule) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {}

// RegisterInterfaces registers module concrete types into protobuf Any. This allows core IBC
// to unmarshal Wasm light client types.
func (AppModule) RegisterInterfaces(reg registry.InterfaceRegistrar) {
func (AppModule) RegisterInterfaces(reg coreregistry.InterfaceRegistrar) {
types.RegisterInterfaces(reg)
}

Expand Down
14 changes: 7 additions & 7 deletions modules/light-clients/08-wasm/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,6 @@ type SimApp struct {
configurator module.Configurator
}

func (app *SimApp) ValidatorKeyProvider() runtime.KeyGenF {
return func() (cmtcrypto.PrivKey, error) {
return cmted25519.GenPrivKey(), nil
}
}

func init() {
userHomeDir, err := os.UserHomeDir()
if err != nil {
Expand Down Expand Up @@ -879,7 +873,7 @@ func NewSimApp(

// Initialize pinned codes in wasmvm as they are not persisted there
if err := app.WasmClientKeeper.InitializePinnedCodes(ctx); err != nil {
fmt.Println(fmt.Sprintf("failed initialize pinned codes %s", err))
fmt.Printf("failed initialize pinned codes %s\n", err)
os.Exit(1)
}
}
Expand Down Expand Up @@ -1000,6 +994,12 @@ func (app *SimApp) DefaultGenesis() map[string]json.RawMessage {
return app.ModuleManager.DefaultGenesis()
}

func (*SimApp) ValidatorKeyProvider() runtime.KeyGenF {
return func() (cmtcrypto.PrivKey, error) {
return cmted25519.GenPrivKey(), nil
}
}

// GetKey returns the KVStoreKey for the provided store key.
//
// NOTE: This is solely to be used for testing purposes.
Expand Down
4 changes: 2 additions & 2 deletions modules/light-clients/08-wasm/types/codec.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
"cosmossdk.io/core/registry"
coreregistry "cosmossdk.io/core/registry"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
Expand All @@ -11,7 +11,7 @@ import (

// RegisterInterfaces registers the Wasm concrete client-related
// implementations and interfaces.
func RegisterInterfaces(registry registry.InterfaceRegistrar) {
func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) {
registry.RegisterImplementations(
(*exported.ClientState)(nil),
&ClientState{},
Expand Down
6 changes: 3 additions & 3 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"cosmossdk.io/x/accounts"
"cosmossdk.io/x/accounts/accountstd"
baseaccount "cosmossdk.io/x/accounts/defaults/base"
lockup "cosmossdk.io/x/accounts/defaults/lockup"
"cosmossdk.io/x/accounts/defaults/lockup"
"cosmossdk.io/x/accounts/defaults/multisig"
"cosmossdk.io/x/authz"
authzkeeper "cosmossdk.io/x/authz/keeper"
Expand Down Expand Up @@ -95,7 +95,7 @@ import (
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/std"
testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb"
"github.com/cosmos/cosmos-sdk/testutil/testdata/testpb"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/types/msgservice"
Expand Down Expand Up @@ -798,7 +798,7 @@ func NewSimApp(
reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc)

// add test gRPC service for testing gRPC queries in isolation
testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{})
testpb.RegisterQueryServer(app.GRPCQueryRouter(), testpb.QueryImpl{})

// create the simulation manager and define the order of the modules for deterministic simulations
//
Expand Down
18 changes: 9 additions & 9 deletions testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"cosmossdk.io/x/accounts"
"cosmossdk.io/x/accounts/accountstd"
baseaccount "cosmossdk.io/x/accounts/defaults/base"
lockup "cosmossdk.io/x/accounts/defaults/lockup"
"cosmossdk.io/x/accounts/defaults/lockup"
"cosmossdk.io/x/accounts/defaults/multisig"
"cosmossdk.io/x/authz"
authzkeeper "cosmossdk.io/x/authz/keeper"
Expand Down Expand Up @@ -95,7 +95,7 @@ import (
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/std"
testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb"
"github.com/cosmos/cosmos-sdk/testutil/testdata/testpb"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/types/msgservice"
Expand Down Expand Up @@ -317,7 +317,7 @@ func NewSimApp(
// voteExtOp := func(bApp *baseapp.BaseApp) {
// voteExtHandler := NewVoteExtensionHandler()
// voteExtHandler.SetHandlers(bApp)
//}
// }
// baseAppOptions = append(baseAppOptions, voteExtOp, baseapp.SetOptimisticExecution(),
// baseapp.SetIncludeNestedMsgsGas([]sdk.Msg{&govv1.MsgSubmitProposal{}}))

Expand Down Expand Up @@ -775,7 +775,7 @@ func NewSimApp(
reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc)

// add test gRPC service for testing gRPC queries in isolation
testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{})
testpb.RegisterQueryServer(app.GRPCQueryRouter(), testpb.QueryImpl{})

// create the simulation manager and define the order of the modules for deterministic simulations
//
Expand Down Expand Up @@ -925,8 +925,8 @@ func (app *SimApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) {
return app.ModuleManager.EndBlock(ctx)
}

func (a *SimApp) Configurator() module.Configurator { //nolint:staticcheck // SA1019: Configurator is deprecated but still used in runtime v1.
return a.configurator
func (app *SimApp) Configurator() module.Configurator { //nolint:staticcheck // SA1019: Configurator is deprecated but still used in runtime v1.
return app.configurator
}

// InitChainer application update at chain initialization
Expand Down Expand Up @@ -983,8 +983,8 @@ func (app *SimApp) AutoCliOpts() autocli.AppOptions {
}

// DefaultGenesis returns a default genesis from the registered AppModule's.
func (a *SimApp) DefaultGenesis() map[string]json.RawMessage {
return a.ModuleManager.DefaultGenesis()
func (app *SimApp) DefaultGenesis() map[string]json.RawMessage {
return app.ModuleManager.DefaultGenesis()
}

// GetKey returns the KVStoreKey for the provided store key.
Expand Down Expand Up @@ -1061,7 +1061,7 @@ func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Conf

// ValidatorKeyProvider returns a function that generates a validator key
// Supported key types are those supported by Comet: ed25519, secp256k1, bls12-381
func (app *SimApp) ValidatorKeyProvider() runtime.KeyGenF {
func (*SimApp) ValidatorKeyProvider() runtime.KeyGenF {
return func() (cmtcrypto.PrivKey, error) {
return cmted25519.GenPrivKey(), nil
}
Expand Down

0 comments on commit 7cb2628

Please sign in to comment.