From f2ee972e31e00eb5604b613f50255f848dfe61c0 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Tue, 23 Feb 2021 08:46:01 +0000 Subject: [PATCH] various linter fixes (#8666) --- client/docs/statik/init.go | 2 +- client/rest/rest.go | 1 + client/rpc/block.go | 2 +- client/rpc/validators.go | 2 +- simapp/test_helpers.go | 4 ++-- store/gaskv/store.go | 1 - types/decimal.go | 15 ++------------- types/decimal_test.go | 2 -- types/errors/errors.go | 1 - types/module/module.go | 8 -------- types/simulation/config.go | 4 ++-- types/simulation/types.go | 2 -- types/uint.go | 2 -- x/auth/legacy/v034/types.go | 1 - x/auth/legacy/v036/migrate.go | 1 - x/auth/legacy/v036/types.go | 1 - x/auth/legacy/v038/types.go | 1 - x/auth/legacy/v039/types.go | 1 - x/auth/module.go | 8 +++----- x/auth/testutil/suite.go | 3 +-- x/auth/types/account_retriever.go | 1 - x/auth/types/params.go | 1 - x/auth/vesting/types/vesting_account.go | 4 ---- x/bank/legacy/v036/types.go | 1 - x/bank/legacy/v038/types.go | 1 - x/bank/module.go | 4 ---- x/bank/simulation/operations.go | 3 --- x/crisis/handler_test.go | 2 -- x/crisis/keeper/msg_server.go | 16 ++-------------- x/crisis/module.go | 2 -- x/distribution/legacy/v034/types.go | 1 - x/distribution/legacy/v036/types.go | 1 - x/distribution/legacy/v038/migrate.go | 1 - x/distribution/legacy/v038/types.go | 1 - x/distribution/module.go | 4 ---- x/evidence/module.go | 2 -- x/feegrant/module.go | 2 -- x/genaccounts/legacy/v034/types.go | 1 - x/genaccounts/legacy/v036/types.go | 1 - x/genutil/module.go | 2 -- x/gov/client/rest/rest.go | 1 - x/gov/client/utils/utils.go | 4 ++-- x/gov/legacy/v034/types.go | 1 - x/gov/legacy/v036/types.go | 1 - x/gov/module.go | 4 ---- x/gov/types/vote.go | 1 - x/ibc/applications/transfer/module.go | 4 ---- x/ibc/core/module.go | 2 -- x/ibc/testing/mock/mock.go | 2 -- x/mint/keeper/keeper.go | 6 ------ x/mint/module.go | 4 ---- x/params/module.go | 2 -- x/simulation/log.go | 1 - x/simulation/mock_tendermint.go | 2 -- x/simulation/operation.go | 4 ---- x/simulation/params.go | 3 --- x/simulation/simulate.go | 2 -- x/slashing/keeper/hooks.go | 2 -- x/slashing/module.go | 4 ---- x/slashing/simulation/operations.go | 1 - x/slashing/types/events.go | 1 - x/staking/keeper/alias_functions.go | 2 -- x/staking/keeper/querier.go | 1 - x/staking/keeper/query_utils.go | 4 +--- x/staking/keeper/slash_test.go | 1 - x/staking/keeper/validator.go | 1 - x/staking/legacy/v034/types.go | 1 - x/staking/legacy/v036/migrate.go | 1 - x/staking/legacy/v036/types.go | 1 - x/staking/legacy/v038/migrate.go | 1 - x/staking/legacy/v038/types.go | 1 - x/staking/module.go | 2 -- x/staking/simulation/operations.go | 5 ----- x/staking/types/expected_keepers.go | 1 - 74 files changed, 19 insertions(+), 168 deletions(-) diff --git a/client/docs/statik/init.go b/client/docs/statik/init.go index 7d91b40fcd..db70716be4 100644 --- a/client/docs/statik/init.go +++ b/client/docs/statik/init.go @@ -1,3 +1,3 @@ package statik -//This just for fixing the error in importing empty github.com/cosmos/cosmos-sdk/client/docs/statik +// This just for fixing the error in importing empty github.com/cosmos/cosmos-sdk/client/docs/statik diff --git a/client/rest/rest.go b/client/rest/rest.go index ac05891e04..035b0f5dbb 100644 --- a/client/rest/rest.go +++ b/client/rest/rest.go @@ -25,6 +25,7 @@ func addHTTPDeprecationHeaders(h http.Handler) http.Handler { // WithHTTPDeprecationHeaders returns a new *mux.Router, identical to its input // but with the addition of HTTP Deprecation headers. This is used to mark legacy // amino REST endpoints as deprecated in the REST API. +// nolint: gocritic func WithHTTPDeprecationHeaders(r *mux.Router) *mux.Router { subRouter := r.NewRoute().Subrouter() subRouter.Use(addHTTPDeprecationHeaders) diff --git a/client/rpc/block.go b/client/rpc/block.go index d6b79c9fe6..530f7c45df 100644 --- a/client/rpc/block.go +++ b/client/rpc/block.go @@ -15,7 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" ) -//BlockCommand returns the verified block data for a given heights +// BlockCommand returns the verified block data for a given heights func BlockCommand() *cobra.Command { cmd := &cobra.Command{ Use: "block [height]", diff --git a/client/rpc/validators.go b/client/rpc/validators.go index 7760aead99..7fb9cf9572 100644 --- a/client/rpc/validators.go +++ b/client/rpc/validators.go @@ -22,7 +22,7 @@ import ( // TODO these next two functions feel kinda hacky based on their placement -//ValidatorCommand returns the validator set for a given height +// ValidatorCommand returns the validator set for a given height func ValidatorCommand() *cobra.Command { cmd := &cobra.Command{ Use: "tendermint-validator-set [height]", diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 9df0fdb754..df80e4fcca 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -219,9 +219,9 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { // start at 100 so we can make up to 999 test addresses with valid test addresses for i := 100; i < (accNum + 100); i++ { numString := strconv.Itoa(i) - buffer.WriteString("A58856F0FD53BF058B4909A21AEC019107BA6") //base address string + buffer.WriteString("A58856F0FD53BF058B4909A21AEC019107BA6") // base address string - buffer.WriteString(numString) //adding on final two digits to make addresses unique + buffer.WriteString(numString) // adding on final two digits to make addresses unique res, _ := sdk.AccAddressFromHex(buffer.String()) bech := res.String() addr, _ := TestAddr(buffer.String(), bech) diff --git a/store/gaskv/store.go b/store/gaskv/store.go index d5c1f86c20..06b55f5ead 100644 --- a/store/gaskv/store.go +++ b/store/gaskv/store.go @@ -19,7 +19,6 @@ type Store struct { } // NewStore returns a reference to a new GasKVStore. -// nolint func NewStore(parent types.KVStore, gasMeter types.GasMeter, gasConfig types.GasConfig) *Store { kvs := &Store{ gasMeter: gasMeter, diff --git a/types/decimal.go b/types/decimal.go index bf93f43c3f..706859a856 100644 --- a/types/decimal.go +++ b/types/decimal.go @@ -80,8 +80,6 @@ func precisionMultiplier(prec int64) *big.Int { return precisionMultipliers[prec] } -//______________________________________________________________________________________________ - // create a new Dec from integer assuming whole number func NewDec(i int64) Dec { return NewDecWithPrec(i, 0) @@ -195,8 +193,6 @@ func MustNewDecFromStr(s string) Dec { return dec } -//______________________________________________________________________________________________ -//nolint func (d Dec) IsNil() bool { return d.i == nil } // is decimal nil func (d Dec) IsZero() bool { return (d.i).Sign() == 0 } // is equal to zero func (d Dec) IsNegative() bool { return (d.i).Sign() == -1 } // is negative @@ -215,8 +211,8 @@ func (d Dec) BigInt() *big.Int { return nil } - copy := new(big.Int) - return copy.Set(d.i) + cp := new(big.Int) + return cp.Set(d.i) } // addition @@ -561,8 +557,6 @@ func (d Dec) RoundInt() Int { return NewIntFromBigInt(chopPrecisionAndRoundNonMutative(d.i)) } -//___________________________________________________________________________________ - // similar to chopPrecisionAndRound, but always rounds down func chopPrecisionAndTruncate(d *big.Int) *big.Int { return d.Quo(d, precisionReuse) @@ -612,8 +606,6 @@ func (d Dec) Ceil() Dec { return NewDecFromBigInt(quo.Add(quo, oneInt)) } -//___________________________________________________________________________________ - // MaxSortableDec is the largest Dec that can be passed into SortableDecBytes() // Its negative form is the least Dec that can be passed in. var MaxSortableDec = OneDec().Quo(SmallestDec()) @@ -648,8 +640,6 @@ func SortableDecBytes(dec Dec) []byte { return []byte(fmt.Sprintf(fmt.Sprintf("%%0%ds", Precision*2+1), dec.String())) } -//___________________________________________________________________________________ - // reuse nil values var nilJSON []byte @@ -758,7 +748,6 @@ func (dp DecProto) String() string { return dp.Dec.String() } -//___________________________________________________________________________________ // helpers // test if two decimal arrays are equal diff --git a/types/decimal_test.go b/types/decimal_test.go index 8e62275a0e..050d19f500 100644 --- a/types/decimal_test.go +++ b/types/decimal_test.go @@ -29,8 +29,6 @@ func (s *decimalTestSuite) mustNewDecFromStr(str string) (d sdk.Dec) { return d } -//_______________________________________ - func (s *decimalTestSuite) TestNewDecFromStr() { largeBigInt, success := new(big.Int).SetString("3144605511029693144278234343371835", 10) s.Require().True(success) diff --git a/types/errors/errors.go b/types/errors/errors.go index 6c540a1d61..1dcc63e656 100644 --- a/types/errors/errors.go +++ b/types/errors/errors.go @@ -15,7 +15,6 @@ const UndefinedCodespace = "undefined" var ( // errInternal should never be exposed, but we reserve this code for non-specified errors - //nolint errInternal = Register(UndefinedCodespace, 1, "internal") // ErrTxDecode is returned if we cannot parse a transaction diff --git a/types/module/module.go b/types/module/module.go index 58bb4927b2..b998f273af 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -43,8 +43,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -//__________________________________________________________________________________________ - // AppModuleBasic is the standard form for basic non-dependant elements of an application module. type AppModuleBasic interface { Name() string @@ -146,8 +144,6 @@ func (bm BasicManager) AddQueryCommands(rootQueryCmd *cobra.Command) { } } -//_________________________________________________________ - // AppModuleGenesis is the standard form for an application module genesis functions type AppModuleGenesis interface { AppModuleBasic @@ -186,8 +182,6 @@ type AppModule interface { EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate } -//___________________________ - // GenesisOnlyAppModule is an AppModule that only has import/export functionality type GenesisOnlyAppModule struct { AppModuleGenesis @@ -226,8 +220,6 @@ func (GenesisOnlyAppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []ab return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // Manager defines a module manager that provides the high level utility for managing and executing // operations for a group of modules type Manager struct { diff --git a/types/simulation/config.go b/types/simulation/config.go index 58a39bb17d..8bad709545 100644 --- a/types/simulation/config.go +++ b/types/simulation/config.go @@ -6,8 +6,8 @@ type Config struct { ParamsFile string // custom simulation params file which overrides any random params; cannot be used with genesis ExportParamsPath string // custom file path to save the exported params JSON - ExportParamsHeight int //height to which export the randomly generated params - ExportStatePath string //custom file path to save the exported app state JSON + ExportParamsHeight int // height to which export the randomly generated params + ExportStatePath string // custom file path to save the exported app state JSON ExportStatsPath string // custom file path to save the exported simulation statistics JSON Seed int64 // simulation random seed diff --git a/types/simulation/types.go b/types/simulation/types.go index 46ede62a35..fabbcd4755 100644 --- a/types/simulation/types.go +++ b/types/simulation/types.go @@ -125,8 +125,6 @@ func (om OperationMsg) LogEvent(eventLogger func(route, op, evResult string)) { eventLogger(om.Route, om.Name, pass) } -//________________________________________________________________________ - // FutureOperation is an operation which will be ran at the beginning of the // provided BlockHeight. If both a BlockHeight and BlockTime are specified, it // will use the BlockHeight. In the (likely) event that multiple operations diff --git a/types/uint.go b/types/uint.go index d449c5262b..dbdd17bd58 100644 --- a/types/uint.go +++ b/types/uint.go @@ -207,8 +207,6 @@ func (u *Uint) Size() int { func (u Uint) MarshalAmino() ([]byte, error) { return u.Marshal() } func (u *Uint) UnmarshalAmino(bz []byte) error { return u.Unmarshal(bz) } -//__________________________________________________________________________ - // UintOverflow returns true if a given unsigned integer overflows and false // otherwise. func UintOverflow(i *big.Int) error { diff --git a/x/auth/legacy/v034/types.go b/x/auth/legacy/v034/types.go index c5df671017..83fa2d36ea 100644 --- a/x/auth/legacy/v034/types.go +++ b/x/auth/legacy/v034/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v034 import ( diff --git a/x/auth/legacy/v036/migrate.go b/x/auth/legacy/v036/migrate.go index c651df6994..2ab4aa1437 100644 --- a/x/auth/legacy/v036/migrate.go +++ b/x/auth/legacy/v036/migrate.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import ( diff --git a/x/auth/legacy/v036/types.go b/x/auth/legacy/v036/types.go index 2490f4baa2..908165f265 100644 --- a/x/auth/legacy/v036/types.go +++ b/x/auth/legacy/v036/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import v034auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v034" diff --git a/x/auth/legacy/v038/types.go b/x/auth/legacy/v038/types.go index e9977c1d29..b7dedf003e 100644 --- a/x/auth/legacy/v038/types.go +++ b/x/auth/legacy/v038/types.go @@ -1,7 +1,6 @@ package v038 // DONTCOVER -// nolint import ( "bytes" diff --git a/x/auth/legacy/v039/types.go b/x/auth/legacy/v039/types.go index 55c3014eb7..3de576f27f 100644 --- a/x/auth/legacy/v039/types.go +++ b/x/auth/legacy/v039/types.go @@ -1,7 +1,6 @@ package v039 // DONTCOVER -// nolint import ( "bytes" diff --git a/x/auth/module.go b/x/auth/module.go index 9e4af71ff0..ff053d8c7c 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -67,7 +67,9 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the auth module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } } // GetTxCmd returns the root tx command for the auth module. @@ -85,8 +87,6 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) types.RegisterInterfaces(registry) } -//____________________________________________________________________________ - // AppModule implements an application module for the auth module. type AppModule struct { AppModuleBasic @@ -159,8 +159,6 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the auth module diff --git a/x/auth/testutil/suite.go b/x/auth/testutil/suite.go index f8002e68e4..b1e9f25c31 100644 --- a/x/auth/testutil/suite.go +++ b/x/auth/testutil/suite.go @@ -15,8 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/signing" ) -// TxConfigTestSuite provides a test suite that can be used to test that a TxConfig implementation is correct -//nolint:golint // type name will be used as tx.TxConfigTestSuite by other packages, and that stutters; consider calling this GeneratorTestSuite +// TxConfigTestSuite provides a test suite that can be used to test that a TxConfig implementation is correct. type TxConfigTestSuite struct { suite.Suite TxConfig client.TxConfig diff --git a/x/auth/types/account_retriever.go b/x/auth/types/account_retriever.go index f84c744188..792524fff0 100644 --- a/x/auth/types/account_retriever.go +++ b/x/auth/types/account_retriever.go @@ -32,7 +32,6 @@ func (ar AccountRetriever) GetAccount(clientCtx client.Context, addr sdk.AccAddr // GetAccountWithHeight queries for an account given an address. Returns the // height of the query with the account. An error is returned if the query // or decoding fails. -//nolint:interfacer func (ar AccountRetriever) GetAccountWithHeight(clientCtx client.Context, addr sdk.AccAddress) (client.Account, int64, error) { var header metadata.MD diff --git a/x/auth/types/params.go b/x/auth/types/params.go index 710ee963b4..13db369d23 100644 --- a/x/auth/types/params.go +++ b/x/auth/types/params.go @@ -48,7 +48,6 @@ func ParamKeyTable() paramtypes.KeyTable { // ParamSetPairs implements the ParamSet interface and returns all the key/value pairs // pairs of auth module's parameters. -// nolint func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair(KeyMaxMemoCharacters, &p.MaxMemoCharacters, validateMaxMemoCharacters), diff --git a/x/auth/vesting/types/vesting_account.go b/x/auth/vesting/types/vesting_account.go index e011bd6efb..0438a338bd 100644 --- a/x/auth/vesting/types/vesting_account.go +++ b/x/auth/vesting/types/vesting_account.go @@ -19,7 +19,6 @@ var ( _ vestexported.VestingAccount = (*DelayedVestingAccount)(nil) ) -//----------------------------------------------------------------------------- // Base Vesting Account // NewBaseVestingAccount creates a new BaseVestingAccount object. It is the @@ -216,7 +215,6 @@ func (bva BaseVestingAccount) MarshalYAML() (interface{}, error) { return string(bz), err } -//----------------------------------------------------------------------------- // Continuous Vesting Account var _ vestexported.VestingAccount = (*ContinuousVestingAccount)(nil) @@ -345,7 +343,6 @@ func (cva ContinuousVestingAccount) MarshalYAML() (interface{}, error) { return string(bz), err } -//----------------------------------------------------------------------------- // Periodic Vesting Account var _ vestexported.VestingAccount = (*PeriodicVestingAccount)(nil) @@ -504,7 +501,6 @@ func (pva PeriodicVestingAccount) MarshalYAML() (interface{}, error) { return string(bz), err } -//----------------------------------------------------------------------------- // Delayed Vesting Account var _ vestexported.VestingAccount = (*DelayedVestingAccount)(nil) diff --git a/x/bank/legacy/v036/types.go b/x/bank/legacy/v036/types.go index 1de8ffb9b7..ada3684048 100644 --- a/x/bank/legacy/v036/types.go +++ b/x/bank/legacy/v036/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import ( diff --git a/x/bank/legacy/v038/types.go b/x/bank/legacy/v038/types.go index e67640bf2b..eba8d3518c 100644 --- a/x/bank/legacy/v038/types.go +++ b/x/bank/legacy/v038/types.go @@ -1,7 +1,6 @@ package v038 // DONTCOVER -// nolint const ( ModuleName = "bank" diff --git a/x/bank/module.go b/x/bank/module.go index 77bff6b73b..c335c3409f 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -86,8 +86,6 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) types.RegisterInterfaces(registry) } -//____________________________________________________________________________ - // AppModule implements an application module for the bank module. type AppModule struct { AppModuleBasic @@ -166,8 +164,6 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the bank module. diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index 40be2feeb4..78feff814c 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -81,7 +81,6 @@ func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operatio } // sendMsgSend sends a transaction with a MsgSend from a provided random account. -// nolint: interfacer func sendMsgSend( r *rand.Rand, app *baseapp.BaseApp, bk keeper.Keeper, ak types.AccountKeeper, msg *types.MsgSend, ctx sdk.Context, chainID string, privkeys []cryptotypes.PrivKey, @@ -223,7 +222,6 @@ func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Ope // sendMsgMultiSend sends a transaction with a MsgMultiSend from a provided random // account. -// nolint: interfacer func sendMsgMultiSend( r *rand.Rand, app *baseapp.BaseApp, bk keeper.Keeper, ak types.AccountKeeper, msg *types.MsgMultiSend, ctx sdk.Context, chainID string, privkeys []cryptotypes.PrivKey, @@ -289,7 +287,6 @@ func sendMsgMultiSend( // randomSendFields returns the sender and recipient simulation accounts as well // as the transferred amount. -// nolint: interfacer func randomSendFields( r *rand.Rand, ctx sdk.Context, accs []simtypes.Account, bk keeper.Keeper, ak types.AccountKeeper, ) (simtypes.Account, simtypes.Account, sdk.Coins, bool) { diff --git a/x/crisis/handler_test.go b/x/crisis/handler_test.go index 593763ad82..e981a1a787 100644 --- a/x/crisis/handler_test.go +++ b/x/crisis/handler_test.go @@ -42,8 +42,6 @@ func createTestApp() (*simapp.SimApp, sdk.Context, []sdk.AccAddress) { return app, ctx, addrs } -//____________________________________________________________________________ - func TestHandleMsgVerifyInvariant(t *testing.T) { app, ctx, addrs := createTestApp() sender := addrs[0] diff --git a/x/crisis/keeper/msg_server.go b/x/crisis/keeper/msg_server.go index 304f8b1724..a3eb07e6ba 100644 --- a/x/crisis/keeper/msg_server.go +++ b/x/crisis/keeper/msg_server.go @@ -43,20 +43,8 @@ func (k Keeper) VerifyInvariant(goCtx context.Context, msg *types.MsgVerifyInvar } if stop { - // NOTE currently, because the chain halts here, this transaction will never be included - // in the blockchain thus the constant fee will have never been deducted. Thus no - // refund is required. - - // TODO uncomment the following code block with implementation of the circuit breaker - //// refund constant fee - //err := k.distrKeeper.DistributeFromFeePool(ctx, constantFee, msg.Sender) - //if err != nil { - //// if there are insufficient coins to refund, log the error, - //// but still halt the chain. - //logger := ctx.Logger().With("module", "x/crisis") - //logger.Error(fmt.Sprintf( - //"WARNING: insufficient funds to allocate to sender from fee pool, err: %s", err)) - //} + // Currently, because the chain halts here, this transaction will never be included in the + // blockchain thus the constant fee will have never been deducted. Thus no refund is required. // TODO replace with circuit breaker panic(res) diff --git a/x/crisis/module.go b/x/crisis/module.go index 66d829be81..ecea78f111 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -80,8 +80,6 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) types.RegisterInterfaces(registry) } -//____________________________________________________________________________ - // AppModule implements an application module for the crisis module. type AppModule struct { AppModuleBasic diff --git a/x/distribution/legacy/v034/types.go b/x/distribution/legacy/v034/types.go index 3ef672f4af..4e8b209ad6 100644 --- a/x/distribution/legacy/v034/types.go +++ b/x/distribution/legacy/v034/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v034 import ( diff --git a/x/distribution/legacy/v036/types.go b/x/distribution/legacy/v036/types.go index 1c43eb5acd..2a11518b4a 100644 --- a/x/distribution/legacy/v036/types.go +++ b/x/distribution/legacy/v036/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import ( diff --git a/x/distribution/legacy/v038/migrate.go b/x/distribution/legacy/v038/migrate.go index cd00668b1e..73e933da45 100644 --- a/x/distribution/legacy/v038/migrate.go +++ b/x/distribution/legacy/v038/migrate.go @@ -1,7 +1,6 @@ package v038 // DONTCOVER -// nolint import ( v036distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v036" diff --git a/x/distribution/legacy/v038/types.go b/x/distribution/legacy/v038/types.go index af7146418d..335fbc1245 100644 --- a/x/distribution/legacy/v038/types.go +++ b/x/distribution/legacy/v038/types.go @@ -7,7 +7,6 @@ import ( ) // DONTCOVER -// nolint const ( ModuleName = "distribution" diff --git a/x/distribution/module.go b/x/distribution/module.go index 0f0c0d358a..0cc40570b5 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -88,8 +88,6 @@ func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) types.RegisterInterfaces(registry) } -//____________________________________________________________________________ - // AppModule implements an application module for the distribution module. type AppModule struct { AppModuleBasic @@ -175,8 +173,6 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the distribution module. diff --git a/x/evidence/module.go b/x/evidence/module.go index 9143e208e7..204cb26351 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -189,8 +189,6 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the evidence module. diff --git a/x/feegrant/module.go b/x/feegrant/module.go index 31b08e6baa..a6f1f4f620 100644 --- a/x/feegrant/module.go +++ b/x/feegrant/module.go @@ -179,8 +179,6 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the feegrant module. diff --git a/x/genaccounts/legacy/v034/types.go b/x/genaccounts/legacy/v034/types.go index 080b534d8e..f4bb73fa37 100644 --- a/x/genaccounts/legacy/v034/types.go +++ b/x/genaccounts/legacy/v034/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v034 import ( diff --git a/x/genaccounts/legacy/v036/types.go b/x/genaccounts/legacy/v036/types.go index 8d143e69d2..e91db341db 100644 --- a/x/genaccounts/legacy/v036/types.go +++ b/x/genaccounts/legacy/v036/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import ( diff --git a/x/genutil/module.go b/x/genutil/module.go index 7a65531e45..ebfb70c4ab 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -66,8 +66,6 @@ func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil } // GetQueryCmd returns no root query command for the genutil module. func (AppModuleBasic) GetQueryCmd() *cobra.Command { return nil } -//____________________________________________________________________________ - // AppModule implements an application module for the genutil module. type AppModule struct { AppModuleBasic diff --git a/x/gov/client/rest/rest.go b/x/gov/client/rest/rest.go index f11798e967..46d66c240b 100644 --- a/x/gov/client/rest/rest.go +++ b/x/gov/client/rest/rest.go @@ -12,7 +12,6 @@ import ( ) // REST Variable names -// nolint const ( RestParamsType = "type" RestProposalID = "proposal-id" diff --git a/x/gov/client/utils/utils.go b/x/gov/client/utils/utils.go index 0e0bf04de7..c88be3df3c 100644 --- a/x/gov/client/utils/utils.go +++ b/x/gov/client/utils/utils.go @@ -40,7 +40,7 @@ func NormalizeWeightedVoteOptions(options string) string { return strings.Join(newOptions, ",") } -//NormalizeProposalType - normalize user specified proposal type +// NormalizeProposalType - normalize user specified proposal type. func NormalizeProposalType(proposalType string) string { switch proposalType { case "Text", "text": @@ -51,7 +51,7 @@ func NormalizeProposalType(proposalType string) string { } } -//NormalizeProposalStatus - normalize user specified proposal status +// NormalizeProposalStatus - normalize user specified proposal status. func NormalizeProposalStatus(status string) string { switch status { case "DepositPeriod", "deposit_period": diff --git a/x/gov/legacy/v034/types.go b/x/gov/legacy/v034/types.go index dd98cca21b..14e0b7a265 100644 --- a/x/gov/legacy/v034/types.go +++ b/x/gov/legacy/v034/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v034 import ( diff --git a/x/gov/legacy/v036/types.go b/x/gov/legacy/v036/types.go index d0bc4620bc..6632c6da25 100644 --- a/x/gov/legacy/v036/types.go +++ b/x/gov/legacy/v036/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import ( diff --git a/x/gov/module.go b/x/gov/module.go index b72a4bfe5f..30ce817e70 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -109,8 +109,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -//____________________________________________________________________________ - // AppModule implements an application module for the gov module. type AppModule struct { AppModuleBasic @@ -190,8 +188,6 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the gov module. diff --git a/x/gov/types/vote.go b/x/gov/types/vote.go index da4317285c..6b7c1660d1 100644 --- a/x/gov/types/vote.go +++ b/x/gov/types/vote.go @@ -56,7 +56,6 @@ func (v Vote) Empty() bool { } // NewNonSplitVoteOption creates a single option vote with weight 1 -//nolint:interfacer func NewNonSplitVoteOption(option VoteOption) WeightedVoteOptions { return WeightedVoteOptions{{option, sdk.NewDec(1)}} } diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index 25290d69a6..b93253ad7a 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -157,8 +157,6 @@ func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.V return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the transfer module. @@ -186,8 +184,6 @@ func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.Weig return nil } -//____________________________________________________________________________ - // ValidateTransferChannelParams does validation of a newly created transfer channel. A transfer // channel must be UNORDERED, use the correct port (by default 'transfer'), and use the current // supported version. Only 2^32 channels are allowed to be created. diff --git a/x/ibc/core/module.go b/x/ibc/core/module.go index 6527ab71eb..9d5d4e8632 100644 --- a/x/ibc/core/module.go +++ b/x/ibc/core/module.go @@ -170,8 +170,6 @@ func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.V return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the ibc module. diff --git a/x/ibc/testing/mock/mock.go b/x/ibc/testing/mock/mock.go index 663497aa05..16e2ad345c 100644 --- a/x/ibc/testing/mock/mock.go +++ b/x/ibc/testing/mock/mock.go @@ -124,8 +124,6 @@ func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.V return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // OnChanOpenInit implements the IBCModule interface. func (am AppModule) OnChanOpenInit( ctx sdk.Context, _ channeltypes.Order, _ []string, portID string, diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index de0a312228..46eb6ba535 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -45,8 +45,6 @@ func NewKeeper( } } -//______________________________________________________________________ - // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) @@ -71,8 +69,6 @@ func (k Keeper) SetMinter(ctx sdk.Context, minter types.Minter) { store.Set(types.MinterKey, b) } -//______________________________________________________________________ - // GetParams returns the total set of minting parameters. func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { k.paramSpace.GetParamSet(ctx, ¶ms) @@ -84,8 +80,6 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { k.paramSpace.SetParamSet(ctx, ¶ms) } -//______________________________________________________________________ - // StakingTokenSupply implements an alias call to the underlying staking keeper's // StakingTokenSupply to be used in BeginBlocker. func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int { diff --git a/x/mint/module.go b/x/mint/module.go index d33043b36a..a4d1f113f0 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -83,8 +83,6 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -//____________________________________________________________________________ - // AppModule implements an application module for the mint module. type AppModule struct { AppModuleBasic @@ -160,8 +158,6 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the mint module. diff --git a/x/params/module.go b/x/params/module.go index c1a115b210..624ff2d25e 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -72,8 +72,6 @@ func (am AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistr proposal.RegisterInterfaces(registry) } -//____________________________________________________________________________ - // AppModule implements an application module for the distribution module. type AppModule struct { AppModuleBasic diff --git a/x/simulation/log.go b/x/simulation/log.go index 236a724407..ba22b2af4a 100644 --- a/x/simulation/log.go +++ b/x/simulation/log.go @@ -68,7 +68,6 @@ func createLogFile() *os.File { return f } -//_____________________ // dummy log writter type DummyLogWriter struct{} diff --git a/x/simulation/mock_tendermint.go b/x/simulation/mock_tendermint.go index ad84e8213d..55c2ca5444 100644 --- a/x/simulation/mock_tendermint.go +++ b/x/simulation/mock_tendermint.go @@ -59,8 +59,6 @@ func (vals mockValidators) getKeys() []string { return keys } -//_________________________________________________________________________________ - // randomProposer picks a random proposer from the current validator set func (vals mockValidators) randomProposer(r *rand.Rand) tmbytes.HexBytes { keys := vals.getKeys() diff --git a/x/simulation/operation.go b/x/simulation/operation.go index 914daafc8b..7aab48e9fb 100644 --- a/x/simulation/operation.go +++ b/x/simulation/operation.go @@ -64,8 +64,6 @@ func (oe OperationEntry) MustMarshal() json.RawMessage { return out } -//_____________________________________________________________________ - // OperationQueue defines an object for a queue of operations type OperationQueue map[int][]simulation.Operation @@ -107,8 +105,6 @@ func queueOperations(queuedOps OperationQueue, queuedTimeOps []simulation.Future } } -//________________________________________________________________________ - // WeightedOperation is an operation with associated weight. // This is used to bias the selection operation within the simulator. type WeightedOperation struct { diff --git a/x/simulation/params.go b/x/simulation/params.go index 12e8e09726..b0569e9489 100644 --- a/x/simulation/params.go +++ b/x/simulation/params.go @@ -87,7 +87,6 @@ func RandomParams(r *rand.Rand) Params { } } -//----------------------------------------------------------------------------- // Param change proposals // ParamChange defines the object used for simulating parameter change proposals @@ -123,7 +122,6 @@ func (spc ParamChange) ComposedKey() string { return fmt.Sprintf("%s/%s", spc.Subspace(), spc.Key()) } -//----------------------------------------------------------------------------- // Proposal Contents // WeightedProposalContent defines a common struct for proposal contents defined by @@ -150,7 +148,6 @@ func (w WeightedProposalContent) ContentSimulatorFn() simulation.ContentSimulato return w.contentSimulatorFn } -//----------------------------------------------------------------------------- // Param change proposals // randomConsensusParams returns random simulation consensus parameters, it extracts the Evidence from the Staking genesis state. diff --git a/x/simulation/simulate.go b/x/simulation/simulate.go index fdcf224611..6e391aa2eb 100644 --- a/x/simulation/simulate.go +++ b/x/simulation/simulate.go @@ -240,8 +240,6 @@ func SimulateFromSeed( return false, exportedParams, nil } -//______________________________________________________________________________ - type blockSimFn func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simulation.Account, header tmproto.Header) (opCount int) diff --git a/x/slashing/keeper/hooks.go b/x/slashing/keeper/hooks.go index d596014258..e3a00e9f55 100644 --- a/x/slashing/keeper/hooks.go +++ b/x/slashing/keeper/hooks.go @@ -42,8 +42,6 @@ func (k Keeper) AfterValidatorRemoved(ctx sdk.Context, address sdk.ConsAddress) k.deleteAddrPubkeyRelation(ctx, crypto.Address(address)) } -//_________________________________________________________________________________________ - // Hooks wrapper struct for slashing keeper type Hooks struct { k Keeper diff --git a/x/slashing/module.go b/x/slashing/module.go index ba5cfb60ad..a1b99e0441 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -91,8 +91,6 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -//____________________________________________________________________________ - // AppModule implements an application module for the slashing module. type AppModule struct { AppModuleBasic @@ -173,8 +171,6 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato return []abci.ValidatorUpdate{} } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the slashing module. diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index 1c49775cc1..19f106ddb7 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -43,7 +43,6 @@ func WeightedOperations( } // SimulateMsgUnjail generates a MsgUnjail with random values -// nolint: interfacer func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, sk stakingkeeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, diff --git a/x/slashing/types/events.go b/x/slashing/types/events.go index 62b6493c34..e9fb254545 100644 --- a/x/slashing/types/events.go +++ b/x/slashing/types/events.go @@ -1,4 +1,3 @@ -//noalias package types // Slashing module event types diff --git a/x/staking/keeper/alias_functions.go b/x/staking/keeper/alias_functions.go index 1d563c6907..36c2d23661 100644 --- a/x/staking/keeper/alias_functions.go +++ b/x/staking/keeper/alias_functions.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -//_______________________________________________________________________ // Validator Set // iterate through the validator set and perform the provided function @@ -96,7 +95,6 @@ func (k Keeper) ValidatorByConsAddr(ctx sdk.Context, addr sdk.ConsAddress) types return val } -//_______________________________________________________________________ // Delegation Set // Returns self as it is both a validatorset and delegationset diff --git a/x/staking/keeper/querier.go b/x/staking/keeper/querier.go index 48272e2451..06bab77046 100644 --- a/x/staking/keeper/querier.go +++ b/x/staking/keeper/querier.go @@ -444,7 +444,6 @@ func queryParameters(ctx sdk.Context, k Keeper, legacyQuerierCdc *codec.LegacyAm return res, nil } -//______________________________________________________ // util func DelegationToDelegationResponse(ctx sdk.Context, k Keeper, del types.Delegation) (types.DelegationResponse, error) { diff --git a/x/staking/keeper/query_utils.go b/x/staking/keeper/query_utils.go index a6f323092a..d757522f6d 100644 --- a/x/staking/keeper/query_utils.go +++ b/x/staking/keeper/query_utils.go @@ -50,8 +50,6 @@ func (k Keeper) GetDelegatorValidator( return validator, nil } -//_____________________________________________________________________________________ - // return all delegations for a delegator func (k Keeper) GetAllDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress) []types.Delegation { delegations := make([]types.Delegation, 0) @@ -59,7 +57,7 @@ func (k Keeper) GetAllDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAdd store := ctx.KVStore(k.storeKey) delegatorPrefixKey := types.GetDelegationsKey(delegator) - iterator := sdk.KVStorePrefixIterator(store, delegatorPrefixKey) //smallest to largest + iterator := sdk.KVStorePrefixIterator(store, delegatorPrefixKey) // smallest to largest defer iterator.Close() i := 0 diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 146ed58687..3f72e857f4 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -381,7 +381,6 @@ func TestSlashWithUnbondingDelegation(t *testing.T) { require.Equal(t, validator.GetStatus(), types.Unbonding) } -//_________________________________________________________________________________ // tests Slash at a previous height with a redelegation func TestSlashWithRedelegation(t *testing.T) { app, ctx, addrDels, addrVals := bootstrapSlashTest(t, 10) diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index 0253c197ae..46585c4ff1 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -240,7 +240,6 @@ func (k Keeper) ValidatorsPowerStoreIterator(ctx sdk.Context) sdk.Iterator { return sdk.KVStoreReversePrefixIterator(store, types.ValidatorsByPowerIndexKey) } -//_______________________________________________________________________ // Last Validator Index // Load the last validator power. diff --git a/x/staking/legacy/v034/types.go b/x/staking/legacy/v034/types.go index 9f8622d4be..539e6534bc 100644 --- a/x/staking/legacy/v034/types.go +++ b/x/staking/legacy/v034/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v034 import ( diff --git a/x/staking/legacy/v036/migrate.go b/x/staking/legacy/v036/migrate.go index cc4d7a4089..bb1f78bc40 100644 --- a/x/staking/legacy/v036/migrate.go +++ b/x/staking/legacy/v036/migrate.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import ( diff --git a/x/staking/legacy/v036/types.go b/x/staking/legacy/v036/types.go index b433b00701..44cf3746d1 100644 --- a/x/staking/legacy/v036/types.go +++ b/x/staking/legacy/v036/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v036 import ( diff --git a/x/staking/legacy/v038/migrate.go b/x/staking/legacy/v038/migrate.go index 21029881a3..d2f65edadf 100644 --- a/x/staking/legacy/v038/migrate.go +++ b/x/staking/legacy/v038/migrate.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v038 import ( diff --git a/x/staking/legacy/v038/types.go b/x/staking/legacy/v038/types.go index 58ffa1351b..e11157d0e4 100644 --- a/x/staking/legacy/v038/types.go +++ b/x/staking/legacy/v038/types.go @@ -1,5 +1,4 @@ // DONTCOVER -// nolint package v038 import ( diff --git a/x/staking/module.go b/x/staking/module.go index 48c67e6f5c..ea4033a2f8 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -171,8 +171,6 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val return EndBlocker(ctx, am.keeper) } -//____________________________________________________________________________ - // AppModuleSimulation functions // GenerateGenesisState creates a randomized GenState of the staking module. diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index d9621bc732..cf99446b9f 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -92,7 +92,6 @@ func WeightedOperations( } // SimulateMsgCreateValidator generates a MsgCreateValidator with random values -// nolint: interfacer func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -178,7 +177,6 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k } // SimulateMsgEditValidator generates a MsgEditValidator with random values -// nolint: interfacer func SimulateMsgEditValidator(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -249,7 +247,6 @@ func SimulateMsgEditValidator(ak types.AccountKeeper, bk types.BankKeeper, k kee } // SimulateMsgDelegate generates a MsgDelegate with random values -// nolint: interfacer func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -322,7 +319,6 @@ func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.K } // SimulateMsgUndelegate generates a MsgUndelegate with random values -// nolint: interfacer func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, @@ -412,7 +408,6 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper } // SimulateMsgBeginRedelegate generates a MsgBeginRedelegate with random values -// nolint: interfacer func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, diff --git a/x/staking/types/expected_keepers.go b/x/staking/types/expected_keepers.go index 07ceb7af17..2b7326f99e 100644 --- a/x/staking/types/expected_keepers.go +++ b/x/staking/types/expected_keepers.go @@ -82,7 +82,6 @@ type DelegationSet interface { fn func(index int64, delegation DelegationI) (stop bool)) } -//_______________________________________________________________________________ // Event Hooks // These can be utilized to communicate between a staking keeper and another // keeper which must take particular actions when validators/delegators change