From de345f16d75999bb6f2747180aae7461f65c2113 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:09:30 +0200 Subject: [PATCH] docs: fix typos (backport #21514) (#21551) Co-authored-by: omahs <73983677+omahs@users.noreply.github.com> --- docs/build/building-apps/05-app-testnet.md | 2 +- docs/build/building-modules/03-msg-services.md | 2 +- server/start.go | 2 +- types/address/hash.go | 4 ++-- x/slashing/keeper/keeper.go | 2 +- x/staking/keeper/msg_server_test.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/build/building-apps/05-app-testnet.md b/docs/build/building-apps/05-app-testnet.md index 01c1267142..d773ffd4ed 100644 --- a/docs/build/building-apps/05-app-testnet.md +++ b/docs/build/building-apps/05-app-testnet.md @@ -76,7 +76,7 @@ When creating a testnet the important part is migrate the validator set from man } iterator.Close() - // Remove all valdiators from last validators store + // Remove all validators from last validators store iterator = app.StakingKeeper.LastValidatorsIterator(ctx) for ; iterator.Valid(); iterator.Next() { app.StakingKeeper.LastValidatorPower.Delete(iterator.Key()) diff --git a/docs/build/building-modules/03-msg-services.md b/docs/build/building-modules/03-msg-services.md index 99725182a7..14f9061190 100644 --- a/docs/build/building-modules/03-msg-services.md +++ b/docs/build/building-modules/03-msg-services.md @@ -61,7 +61,7 @@ It is recommended to implement all validation checks in a separate function that ```go ValidateMsgA(msg MsgA, now Time, gm GasMeter) error { if now.Before(msg.Expire) { - return sdkerrrors.ErrInvalidRequest.Wrap("msg expired") + return sdkerrors.ErrInvalidRequest.Wrap("msg expired") } gm.ConsumeGas(1000, "signature verification") return signatureVerificaton(msg.Prover, msg.Data) diff --git a/server/start.go b/server/start.go index 1e565a05cd..069f36e7af 100644 --- a/server/start.go +++ b/server/start.go @@ -906,7 +906,7 @@ func testnetify[T types.Application](ctx *Context, testnetAppCreator types.AppCr return nil, err } - // Create ValidatorSet struct containing just our valdiator. + // Create ValidatorSet struct containing just our validator. newVal := &cmttypes.Validator{ Address: validatorAddress, PubKey: userPubKey, diff --git a/types/address/hash.go b/types/address/hash.go index ee7398518f..7d4db39f85 100644 --- a/types/address/hash.go +++ b/types/address/hash.go @@ -48,7 +48,7 @@ func Compose(typ string, subAddresses []Addressable) ([]byte, error) { a := subAddresses[i].Address() as[i], err = LengthPrefix(a) if err != nil { - return nil, fmt.Errorf("not compatible sub-adddress=%v at index=%d [%w]", a, i, err) + return nil, fmt.Errorf("not compatible sub-address=%v at index=%d [%w]", a, i, err) } totalLen += len(as[i]) } @@ -67,7 +67,7 @@ func Compose(typ string, subAddresses []Addressable) ([]byte, error) { // is constructed from a module name and a sequence of derivation keys (at least one // derivation key must be provided). The derivation keys must be unique // in the module scope, and is usually constructed from some object id. Example, let's -// a x/dao module, and a new DAO object, it's address would be: +// a x/dao module, and a new DAO object, its address would be: // // address.Module(dao.ModuleName, newDAO.ID) func Module(moduleName string, derivationKeys ...[]byte) []byte { diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index 8ea641ca4b..cb5d36e908 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -84,7 +84,7 @@ func (k Keeper) GetAuthority() string { return k.authority } -// GetPubkey returns the pubkey from the adddress-pubkey relation +// GetPubkey returns the pubkey from the address-pubkey relation func (k Keeper) GetPubkey(ctx context.Context, a cryptotypes.Address) (cryptotypes.PubKey, error) { return k.AddrPubkeyRelation.Get(ctx, a) } diff --git a/x/staking/keeper/msg_server_test.go b/x/staking/keeper/msg_server_test.go index 597742f2c6..f436b2ebda 100644 --- a/x/staking/keeper/msg_server_test.go +++ b/x/staking/keeper/msg_server_test.go @@ -436,7 +436,7 @@ func (s *KeeperTestSuite) TestMsgEditValidator() { expErrMsg: "validator does not exist", }, { - name: "change commmission rate in <24hrs", + name: "change commission rate in <24hrs", ctx: ctx, input: &types.MsgEditValidator{ Description: types.Description{