diff --git a/modules/apps/27-interchain-accounts/controller/types/codec.go b/modules/apps/27-interchain-accounts/controller/types/codec.go index 700bd6ff014..2df0a6f7087 100644 --- a/modules/apps/27-interchain-accounts/controller/types/codec.go +++ b/modules/apps/27-interchain-accounts/controller/types/codec.go @@ -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{}, diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go index 1c18cdb63e0..5a500e6ec66 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go @@ -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" @@ -48,7 +48,7 @@ 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) }{ { @@ -56,7 +56,7 @@ func TestGeneratePacketData(t *testing.T) { memo: "", expectedPass: true, message: multiMsg, - registerInterfaceFn: func(registry registry.InterfaceRegistrar) { + registerInterfaceFn: func(registry coreregistry.InterfaceRegistrar) { stakingtypes.RegisterInterfaces(registry) banktypes.RegisterInterfaces(registry) }, diff --git a/modules/apps/callbacks/testing/simapp/app.go b/modules/apps/callbacks/testing/simapp/app.go index 330878d0af9..6a7487cdefb 100644 --- a/modules/apps/callbacks/testing/simapp/app.go +++ b/modules/apps/callbacks/testing/simapp/app.go @@ -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 } diff --git a/modules/core/types/codec.go b/modules/core/types/codec.go index 1280eb6cfcc..84626179a92 100644 --- a/modules/core/types/codec.go +++ b/modules/core/types/codec.go @@ -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" @@ -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) diff --git a/modules/light-clients/07-tendermint/codec.go b/modules/light-clients/07-tendermint/codec.go index d5ef5fc0acf..897ba9ee88b 100644 --- a/modules/light-clients/07-tendermint/codec.go +++ b/modules/light-clients/07-tendermint/codec.go @@ -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{}, diff --git a/modules/light-clients/08-wasm/module.go b/modules/light-clients/08-wasm/module.go index c05b6737dc1..43dfc8bba06 100644 --- a/modules/light-clients/08-wasm/module.go +++ b/modules/light-clients/08-wasm/module.go @@ -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" @@ -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) } diff --git a/modules/light-clients/08-wasm/testing/simapp/app.go b/modules/light-clients/08-wasm/testing/simapp/app.go index d132314a756..ffe9cd5b223 100644 --- a/modules/light-clients/08-wasm/testing/simapp/app.go +++ b/modules/light-clients/08-wasm/testing/simapp/app.go @@ -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 { @@ -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) } } @@ -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. diff --git a/modules/light-clients/08-wasm/types/codec.go b/modules/light-clients/08-wasm/types/codec.go index 13268f6046c..b6743a9c69a 100644 --- a/modules/light-clients/08-wasm/types/codec.go +++ b/modules/light-clients/08-wasm/types/codec.go @@ -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" @@ -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{}, diff --git a/simapp/app.go b/simapp/app.go index 080d09a3533..302d62ad126 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -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" @@ -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" @@ -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 // diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 0f888e10d54..50288607aeb 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -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" @@ -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" @@ -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{}})) @@ -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 // @@ -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 @@ -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. @@ -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 }