Skip to content

Commit 83fdb7f

Browse files
authored
chore: address some linter complaints (#7734)
1 parent 6cd1b8f commit 83fdb7f

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

modules/apps/29-fee/types/keys.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func KeyCounterpartyPayee(address, channelID string) []byte {
9797
}
9898

9999
// ParseKeyCounterpartyPayee returns the registered relayer address and channelID used to store the counterparty payee address
100-
func ParseKeyCounterpartyPayee(key string) (address string, channelID string, error error) {
100+
func ParseKeyCounterpartyPayee(key string) (address string, channelID string, err error) {
101101
keySplit := strings.Split(key, "/")
102102
if len(keySplit) != 3 {
103103
return "", "", errorsmod.Wrapf(

simapp/app.go

+8-9
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ import (
138138
ibcclienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types"
139139
ibcconnectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types"
140140
porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types"
141-
"github.com/cosmos/ibc-go/v9/modules/core/exported"
142141
ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported"
143142
ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper"
144143
solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine"
@@ -321,7 +320,7 @@ func NewSimApp(
321320
// voteExtOp := func(bApp *baseapp.BaseApp) {
322321
// voteExtHandler := NewVoteExtensionHandler()
323322
// voteExtHandler.SetHandlers(bApp)
324-
//}
323+
// }
325324
// baseAppOptions = append(baseAppOptions, voteExtOp, baseapp.SetOptimisticExecution(),
326325
// baseapp.SetIncludeNestedMsgsGas([]sdk.Msg{&govv1.MsgSubmitProposal{}}))
327326

@@ -539,7 +538,7 @@ func NewSimApp(
539538
// IBC Fee Module keeper
540539
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
541540
appCodec,
542-
runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", exported.ModuleName, ibcfeetypes.ModuleName))),
541+
runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", ibcexported.ModuleName, ibcfeetypes.ModuleName))),
543542
app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware
544543
app.IBCKeeper.ChannelKeeper,
545544
app.AuthKeeper, app.BankKeeper,
@@ -575,7 +574,7 @@ func NewSimApp(
575574
// since fee middleware will wrap the IBCKeeper for underlying application.
576575
app.TransferKeeper = ibctransferkeeper.NewKeeper(
577576
appCodec,
578-
runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", exported.ModuleName, ibctransfertypes.ModuleName))),
577+
runtime.NewEnvironment(runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), logger.With(log.ModuleKey, fmt.Sprintf("x/%s-%s", ibcexported.ModuleName, ibctransfertypes.ModuleName))),
579578
app.GetSubspace(ibctransfertypes.ModuleName),
580579
app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware
581580
app.IBCKeeper.ChannelKeeper,
@@ -959,8 +958,8 @@ func (app *SimApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) {
959958
return app.ModuleManager.EndBlock(ctx)
960959
}
961960

962-
func (a *SimApp) Configurator() module.Configurator { //nolint:staticcheck // SA1019: Configurator is deprecated but still used in runtime v1.
963-
return a.configurator
961+
func (app *SimApp) Configurator() module.Configurator { //nolint:staticcheck // SA1019: Configurator is deprecated but still used in runtime v1.
962+
return app.configurator
964963
}
965964

966965
// InitChainer application update at chain initialization
@@ -1017,8 +1016,8 @@ func (app *SimApp) AutoCliOpts() autocli.AppOptions {
10171016
}
10181017

10191018
// DefaultGenesis returns a default genesis from the registered AppModule's.
1020-
func (a *SimApp) DefaultGenesis() map[string]json.RawMessage {
1021-
return a.ModuleManager.DefaultGenesis()
1019+
func (app *SimApp) DefaultGenesis() map[string]json.RawMessage {
1020+
return app.ModuleManager.DefaultGenesis()
10221021
}
10231022

10241023
// GetKey returns the KVStoreKey for the provided store key.
@@ -1095,7 +1094,7 @@ func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Conf
10951094

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

testing/chain.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func NewTestChainWithValSet(tb testing.TB, coord *Coordinator, chainID string, v
138138
app := SetupWithGenesisValSet(tb, valSet, genAccs, chainID, sdk.DefaultPowerReduction, genBals...)
139139

140140
// create current header and call begin block
141-
header := cmtproto.Header{
141+
cmtHeader := cmtproto.Header{
142142
ChainID: chainID,
143143
Height: 1,
144144
Time: coord.CurrentTime.UTC(),
@@ -152,7 +152,7 @@ func NewTestChainWithValSet(tb testing.TB, coord *Coordinator, chainID string, v
152152
Coordinator: coord,
153153
ChainID: chainID,
154154
App: app,
155-
ProposedHeader: header,
155+
ProposedHeader: cmtHeader,
156156
TxConfig: txConfig,
157157
Codec: app.AppCodec(),
158158
Vals: valSet,
@@ -579,7 +579,7 @@ func (chain *TestChain) DeleteKey(key []byte) {
579579

580580
// IBCClientHeader will construct a 07-tendermint Header to update the light client
581581
// on the counterparty chain. The trustedHeight must be passed in as a non-zero height.
582-
func (chain *TestChain) IBCClientHeader(header *ibctm.Header, trustedHeight clienttypes.Height) (*ibctm.Header, error) {
582+
func (chain *TestChain) IBCClientHeader(ibcHeader *ibctm.Header, trustedHeight clienttypes.Height) (*ibctm.Header, error) {
583583
if trustedHeight.IsZero() {
584584
return nil, errorsmod.Wrap(ibctm.ErrInvalidHeaderHeight, "trustedHeight must be a non-zero height")
585585
}
@@ -594,9 +594,9 @@ func (chain *TestChain) IBCClientHeader(header *ibctm.Header, trustedHeight clie
594594
return nil, err
595595
}
596596

597-
header.TrustedHeight = trustedHeight
597+
ibcHeader.TrustedHeight = trustedHeight
598598
trustedVals.TotalVotingPower = cmtTrustedVals.TotalVotingPower()
599-
header.TrustedValidators = trustedVals
599+
ibcHeader.TrustedValidators = trustedVals
600600

601-
return header, nil
601+
return ibcHeader, nil
602602
}

0 commit comments

Comments
 (0)