From b12485beb5b7cd9fd1f123c93357d0df9ef95e1c Mon Sep 17 00:00:00 2001 From: strmfos <155266597+strmfos@users.noreply.github.com> Date: Tue, 29 Jul 2025 21:17:30 +0200 Subject: [PATCH] fix: typos across the codebase (#25041) --- x/crisis/autocli.go | 2 +- x/crisis/types/route.go | 2 +- x/distribution/keeper/allocation.go | 2 +- x/distribution/keeper/delegation.go | 2 +- x/distribution/keeper/msg_server.go | 2 +- x/distribution/simulation/operations_test.go | 2 +- x/distribution/types/keys.go | 2 +- x/epochs/keeper/grpc_query.go | 2 +- x/evidence/CHANGELOG.md | 2 +- x/feegrant/README.md | 2 +- x/feegrant/basic_fee_test.go | 4 ++-- x/feegrant/events.go | 2 +- x/gov/keeper/tally_test.go | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/x/crisis/autocli.go b/x/crisis/autocli.go index d8926f4b86..6750048169 100644 --- a/x/crisis/autocli.go +++ b/x/crisis/autocli.go @@ -14,7 +14,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { { RpcMethod: "VerifyInvariant", Use: "invariant-broken [module-name] [invariant-route] --from mykey", - Short: "Submit proof that an invariant broken", + Short: "Submit proof that an invariant is broken", PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "invariant_module_name"}, {ProtoField: "invariant_route"}, diff --git a/x/crisis/types/route.go b/x/crisis/types/route.go index 1096798e8c..22c93cc44c 100644 --- a/x/crisis/types/route.go +++ b/x/crisis/types/route.go @@ -20,7 +20,7 @@ func NewInvarRoute(moduleName, route string, invar sdk.Invariant) InvarRoute { } } -// get the full invariance route +// get the full invariant route func (i InvarRoute) FullRoute() string { return i.ModuleName + "/" + i.Route } diff --git a/x/distribution/keeper/allocation.go b/x/distribution/keeper/allocation.go index f91178ab48..4dd4122210 100644 --- a/x/distribution/keeper/allocation.go +++ b/x/distribution/keeper/allocation.go @@ -159,7 +159,7 @@ func (k Keeper) sendCommunityPoolToExternalPool(ctx sdk.Context) error { amt, remaining := feePool.CommunityPool.TruncateDecimal() ctx.Logger().Debug( - "sending distribution community pool amount to external pool pool", + "sending distribution community pool amount to external pool", "pool", k.externalCommunityPool.GetCommunityPoolModule(), "amount", amt.String(), "remaining", remaining.String(), diff --git a/x/distribution/keeper/delegation.go b/x/distribution/keeper/delegation.go index b691d90a57..d38329b587 100644 --- a/x/distribution/keeper/delegation.go +++ b/x/distribution/keeper/delegation.go @@ -150,7 +150,7 @@ func (k Keeper) CalculateDelegationRewards(ctx context.Context, val stakingtypes currentStake := val.TokensFromShares(del.GetShares()) if stake.GT(currentStake) { - // AccountI for rounding inconsistencies between: + // Account for rounding inconsistencies between: // // currentStake: calculated as in staking with a single computation // stake: calculated as an accumulation of stake diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index 59779d0d2b..2f4269d962 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 DistributFromCommunityPool 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 { diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 96ab441141..22090f6943 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -67,7 +67,7 @@ func (suite *SimTestSuite) TestWeightedOperations() { } // TestSimulateMsgSetWithdrawAddress tests the normal scenario of a valid message of type TypeMsgSetWithdrawAddress. -// Abnormal scenarios, where the message is created by an errors, are not tested here. +// Abnormal scenarios, where the message is created by an error, are not tested here. func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { // setup 3 accounts s := rand.NewSource(1) diff --git a/x/distribution/types/keys.go b/x/distribution/types/keys.go index 30aa8923c7..e240fd8993 100644 --- a/x/distribution/types/keys.go +++ b/x/distribution/types/keys.go @@ -24,7 +24,7 @@ const ( // Keys for distribution store // Items are stored with the following key: values // -// - 0x00: FeePol +// - 0x00: FeePool // // - 0x01: sdk.ConsAddress // diff --git a/x/epochs/keeper/grpc_query.go b/x/epochs/keeper/grpc_query.go index 5c7186fb27..716788ab18 100644 --- a/x/epochs/keeper/grpc_query.go +++ b/x/epochs/keeper/grpc_query.go @@ -45,7 +45,7 @@ func (q Querier) CurrentEpoch(ctx context.Context, req *types.QueryCurrentEpochR info, err := q.EpochInfo.Get(ctx, req.Identifier) if err != nil { - return nil, errors.New("not available identifier") + return nil, errors.New("identifier not available") } return &types.QueryCurrentEpochResponse{ diff --git a/x/evidence/CHANGELOG.md b/x/evidence/CHANGELOG.md index 39e2959676..96b277cf38 100644 --- a/x/evidence/CHANGELOG.md +++ b/x/evidence/CHANGELOG.md @@ -43,7 +43,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking Changes -* [#16008](https://github.com/cosmos/cosmos-sdk/pull/16008) NewKeeper now takes in a KVStoreService instead of KVStoreKey, most functions use context.Context instead of sdk.Context and `IterateEvidence` callback function now returns an error to stop interation (`errors.ErrStopIterating`). +* [#16008](https://github.com/cosmos/cosmos-sdk/pull/16008) NewKeeper now takes in a KVStoreService instead of KVStoreKey, most functions use context.Context instead of sdk.Context and `IterateEvidence` callback function now returns an error to stop iteration (`errors.ErrStopIterating`). * (keeper) [#15825](https://github.com/cosmos/cosmos-sdk/pull/15825) Evidence constructor now requires an `address.Codec` (`import "cosmossdk.io/core/address"`) * [#16336](https://github.com/cosmos/cosmos-sdk/pull/16336) Use collections for state management: * Removed: keeper `SetEvidence`, `GetEvidence`, `IterateEvidences`, `GetAllEvidences`, `MustMarshalEvidence`, `MustUnmarshalEvidence`, `MarshalEvidence`, `UnmarshalEvidence` diff --git a/x/feegrant/README.md b/x/feegrant/README.md index 07524449a8..0ac1c29852 100644 --- a/x/feegrant/README.md +++ b/x/feegrant/README.md @@ -152,7 +152,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/feegrant/feegrant.pb.go# ### FeeAllowanceQueue -Fee Allowances queue items are identified by combining the `FeeAllowancePrefixQueue` (i.e., 0x01), `expiration`, `grantee` (the account address of fee allowance grantee), `granter` (the account address of fee allowance granter). Endblocker checks `FeeAllowanceQueue` state for the expired grants and prunes them from `FeeAllowance` if there are any found. +Fee Allowances queue items are identified by combining the `FeeAllowancePrefixQueue` (i.e., 0x01), `expiration`, `grantee` (the account address of fee allowance grantee), `granter` (the account address of fee allowance granter). Endblocker checks `FeeAllowanceQueue` state for the expired grants and prunes them from `FeeAllowance` if there are any found. Fee allowance queue keys are stored in the state as follows: diff --git a/x/feegrant/basic_fee_test.go b/x/feegrant/basic_fee_test.go index 0d4cc1b052..2876a5bc0f 100644 --- a/x/feegrant/basic_fee_test.go +++ b/x/feegrant/basic_fee_test.go @@ -22,10 +22,10 @@ func TestBasicFeeValidAllow(t *testing.T) { ctx := testCtx.Ctx.WithBlockHeader(cmtproto.Header{Height: 1}) badTime := ctx.BlockTime().AddDate(0, 0, -1) - allowace := &feegrant.BasicAllowance{ + allowance := &feegrant.BasicAllowance{ Expiration: &badTime, } - require.Error(t, allowace.ValidateBasic()) + require.Error(t, allowance.ValidateBasic()) ctx = ctx.WithBlockHeader(cmtproto.Header{ Time: time.Now(), diff --git a/x/feegrant/events.go b/x/feegrant/events.go index 70cb6990f0..e5fdbfd2a9 100644 --- a/x/feegrant/events.go +++ b/x/feegrant/events.go @@ -1,6 +1,6 @@ package feegrant -// evidence module events +// feegrant module events const ( EventTypeUseFeeGrant = "use_feegrant" EventTypeRevokeFeeGrant = "revoke_feegrant" diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 4a2913b5a0..dd2600882e 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -87,7 +87,7 @@ func TestMultipleProposalsVoteRemoval(t *testing.T) { require.NoError(t, govKeeper.AddVote(ctx, proposal2ID, addrs[0], v1.NewNonSplitVoteOption(v1.OptionNo), "")) require.NoError(t, govKeeper.AddVote(ctx, proposal2ID, addrs[1], v1.NewNonSplitVoteOption(v1.OptionYes), "")) - // votes should eixst + // votes should exist vote1Addr0, err := govKeeper.Votes.Get(ctx, collections.Join(proposal1ID, addrs[0])) require.NoError(t, err) require.Equal(t, v1.OptionYes, vote1Addr0.Options[0].Option)