diff --git a/modules/apps/29-fee/types/keys.go b/modules/apps/29-fee/types/keys.go index aba4b8c5de9..4b81f00fa8e 100644 --- a/modules/apps/29-fee/types/keys.go +++ b/modules/apps/29-fee/types/keys.go @@ -97,7 +97,7 @@ func KeyCounterpartyPayee(address, channelID string) []byte { } // ParseKeyCounterpartyPayee returns the registered relayer address and channelID used to store the counterparty payee address -func ParseKeyCounterpartyPayee(key string) (address string, channelID string, error error) { +func ParseKeyCounterpartyPayee(key string) (address string, channelID string, err error) { keySplit := strings.Split(key, "/") if len(keySplit) != 3 { return "", "", errorsmod.Wrapf( diff --git a/simapp/app.go b/simapp/app.go index df71f11fd92..ff443f26b6f 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -138,7 +138,6 @@ import ( ibcclienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" ibcconnectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types" - "github.com/cosmos/ibc-go/v9/modules/core/exported" ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper" solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" @@ -321,7 +320,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{}})) @@ -539,7 +538,7 @@ func NewSimApp( // IBC Fee Module keeper app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( appCodec, - runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", exported.ModuleName, ibcfeetypes.ModuleName))), + runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", ibcexported.ModuleName, ibcfeetypes.ModuleName))), app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware app.IBCKeeper.ChannelKeeper, app.AuthKeeper, app.BankKeeper, @@ -575,7 +574,7 @@ func NewSimApp( // since fee middleware will wrap the IBCKeeper for underlying application. app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, - runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", exported.ModuleName, ibctransfertypes.ModuleName))), + runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", ibcexported.ModuleName, ibctransfertypes.ModuleName))), app.GetSubspace(ibctransfertypes.ModuleName), app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware app.IBCKeeper.ChannelKeeper, @@ -959,8 +958,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 @@ -1017,8 +1016,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. @@ -1095,7 +1094,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/testing/chain.go b/testing/chain.go index afa881846c2..eb1143954a7 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -138,7 +138,7 @@ func NewTestChainWithValSet(tb testing.TB, coord *Coordinator, chainID string, v app := SetupWithGenesisValSet(tb, valSet, genAccs, chainID, sdk.DefaultPowerReduction, genBals...) // create current header and call begin block - header := cmtproto.Header{ + cmtHeader := cmtproto.Header{ ChainID: chainID, Height: 1, Time: coord.CurrentTime.UTC(), @@ -152,7 +152,7 @@ func NewTestChainWithValSet(tb testing.TB, coord *Coordinator, chainID string, v Coordinator: coord, ChainID: chainID, App: app, - ProposedHeader: header, + ProposedHeader: cmtHeader, TxConfig: txConfig, Codec: app.AppCodec(), Vals: valSet, @@ -579,7 +579,7 @@ func (chain *TestChain) DeleteKey(key []byte) { // IBCClientHeader will construct a 07-tendermint Header to update the light client // on the counterparty chain. The trustedHeight must be passed in as a non-zero height. -func (chain *TestChain) IBCClientHeader(header *ibctm.Header, trustedHeight clienttypes.Height) (*ibctm.Header, error) { +func (chain *TestChain) IBCClientHeader(ibcHeader *ibctm.Header, trustedHeight clienttypes.Height) (*ibctm.Header, error) { if trustedHeight.IsZero() { return nil, errorsmod.Wrap(ibctm.ErrInvalidHeaderHeight, "trustedHeight must be a non-zero height") } @@ -594,9 +594,9 @@ func (chain *TestChain) IBCClientHeader(header *ibctm.Header, trustedHeight clie return nil, err } - header.TrustedHeight = trustedHeight + ibcHeader.TrustedHeight = trustedHeight trustedVals.TotalVotingPower = cmtTrustedVals.TotalVotingPower() - header.TrustedValidators = trustedVals + ibcHeader.TrustedValidators = trustedVals - return header, nil + return ibcHeader, nil }