diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index 7d6bc75c4e..ec5520d12f 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -382,7 +382,7 @@ func (k BaseKeeper) MintCoins(ctx context.Context, moduleName string, amounts sd return nil } -// BurnCoins burns coins deletes coins from the balance of the module account. +// BurnCoins burns coins from the balance of the module account. // It will panic if the module account does not exist or is unauthorized. func (k BaseKeeper) BurnCoins(ctx context.Context, moduleName string, amounts sdk.Coins) error { acc := k.ak.GetModuleAccount(ctx, moduleName) diff --git a/x/bank/migrations/v4/gen_state_test.go b/x/bank/migrations/v4/gen_state_test.go index 52511eb70b..2f038bd51b 100644 --- a/x/bank/migrations/v4/gen_state_test.go +++ b/x/bank/migrations/v4/gen_state_test.go @@ -28,7 +28,7 @@ func TestMigrateGenState(t *testing.T) { }}, Supply: sdk.Coins{sdk.NewCoin("supplycoin", sdkmath.NewInt(800))}, DenomMetadata: []types.Metadata{{ - Description: "metadesk", + Description: "metadesc", DenomUnits: nil, Base: "meta", Display: "meta", @@ -47,7 +47,7 @@ func TestMigrateGenState(t *testing.T) { }}, Supply: sdk.Coins{sdk.NewCoin("supplycoin", sdkmath.NewInt(800))}, DenomMetadata: []types.Metadata{{ - Description: "metadesk", + Description: "metadesc", DenomUnits: nil, Base: "meta", Display: "meta", diff --git a/x/bank/types/genesis_test.go b/x/bank/types/genesis_test.go index f7412df117..e66c3df863 100644 --- a/x/bank/types/genesis_test.go +++ b/x/bank/types/genesis_test.go @@ -174,7 +174,7 @@ func TestMigrateSendEnabled(t *testing.T) { }}, Supply: sdk.Coins{sdk.NewCoin("supplycoin", math.NewInt(800))}, DenomMetadata: []Metadata{{ - Description: "metadesk", + Description: "metadesc", DenomUnits: nil, Base: "meta", Display: "meta", @@ -192,7 +192,7 @@ func TestMigrateSendEnabled(t *testing.T) { }}, Supply: sdk.Coins{sdk.NewCoin("supplycoin", math.NewInt(800))}, DenomMetadata: []Metadata{{ - Description: "metadesk", + Description: "metadesc", DenomUnits: nil, Base: "meta", Display: "meta", diff --git a/x/bank/types/params_test.go b/x/bank/types/params_test.go index 68340bdddd..40eaecb656 100644 --- a/x/bank/types/params_test.go +++ b/x/bank/types/params_test.go @@ -69,5 +69,5 @@ func Test_validateParams(t *testing.T) { assert.NoError(t, DefaultParams().Validate(), "default") assert.NoError(t, NewParams(true).Validate(), "true") assert.NoError(t, NewParams(false).Validate(), "false") - assert.Error(t, Params{[]*SendEnabled{{"foocoing", false}}, true}.Validate(), "with SendEnabled entry") + assert.Error(t, Params{[]*SendEnabled{{"foocoin", false}}, true}.Validate(), "with SendEnabled entry") } diff --git a/x/bank/types/restrictions_test.go b/x/bank/types/restrictions_test.go index 4197b785ca..9a15b134b1 100644 --- a/x/bank/types/restrictions_test.go +++ b/x/bank/types/restrictions_test.go @@ -391,7 +391,7 @@ func TestNoOpMintingRestrictionFn(t *testing.T) { err = types.NoOpMintingRestrictionFn(sdk.Context{}, sdk.Coins{}) } require.NotPanics(t, testFunc, "NoOpMintingRestrictionFn") - assert.NoError(t, err, "NoOpSendRestrictionFn error") + assert.NoError(t, err, "NoOpMintingRestrictionFn error") } // SendRestrictionArgs are the args provided to a SendRestrictionFn function. diff --git a/x/consensus/keeper/keeper_test.go b/x/consensus/keeper/keeper_test.go index da2bd0b1bd..d5e4db953c 100644 --- a/x/consensus/keeper/keeper_test.go +++ b/x/consensus/keeper/keeper_test.go @@ -165,7 +165,7 @@ func (s *KeeperTestSuite) TestUpdateParams() { expErrMsg: "", }, { - name: "invalid params", + name: "invalid params", input: &types.MsgUpdateParams{ Authority: s.consensusParamsKeeper.GetAuthority(), Block: &cmtproto.BlockParams{MaxGas: -10, MaxBytes: -10}, diff --git a/x/consensus/module.go b/x/consensus/module.go index b4f7ef1eb7..91fdf92f9a 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -54,7 +54,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *g } } -// RegisterInterfaces registers interfaces and implementations of the bank module. +// RegisterInterfaces registers interfaces and implementations of the consensus module. func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) } diff --git a/x/distribution/keeper/abci.go b/x/distribution/keeper/abci.go index 534456d4b0..7e530ff566 100644 --- a/x/distribution/keeper/abci.go +++ b/x/distribution/keeper/abci.go @@ -14,7 +14,6 @@ func (k Keeper) BeginBlocker(ctx sdk.Context) error { // determine the total power signing the block var previousTotalPower int64 - // determine the total power signing the block for _, voteInfo := range ctx.VoteInfos() { previousTotalPower += voteInfo.Validator.Power } diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index dc6f94f832..895d1bbf91 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -760,7 +760,7 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { require.Equal(t, sdk.DecCoins{{Denom: sdk.DefaultBondDenom, Amount: initial}}, valCommission.Commission) } -func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { +func TestCalculateRewardsMultiDelegatorMultiWithdraw(t *testing.T) { ctrl := gomock.NewController(t) key := storetypes.NewKVStoreKey(disttypes.StoreKey) storeService := runtime.NewKVStoreService(key) @@ -989,7 +989,7 @@ func Test100PercentCommissionReward(t *testing.T) { require.NoError(t, distrKeeper.FeePool.Set(ctx, disttypes.InitialFeePool())) require.NoError(t, distrKeeper.Params.Set(ctx, disttypes.DefaultParams())) - // create validator with 50% commission + // create validator with 100% commission valAddr := sdk.ValAddress(valConsAddr0) addr := sdk.AccAddress(valAddr) val, err := distrtestutil.CreateValidator(valConsPk0, math.NewInt(100)) diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index b76039a54c..c502ffb4d9 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -147,7 +147,7 @@ func (k msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) func (k msgServer) CommunityPoolSpend(ctx context.Context, msg *types.MsgCommunityPoolSpend) (*types.MsgCommunityPoolSpendResponse, error) { if k.HasExternalCommunityPool() { - return nil, errors.Wrapf(sdkerrors.ErrInvalidRequest, "external community pool is enabled - use the DistributeFromCommunityPool method exposed by the external community pool") + return nil, errors.Wrapf(sdkerrors.ErrInvalidRequest, "external community pool is enabled - use the DistributeFromCommunityPool method exposed by the external community pool") } if err := k.validateAuthority(msg.Authority); err != nil {