From 7f1eeb1801779020c0696948e8fcd902b9c6e156 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:47:16 +0200 Subject: [PATCH] docs: fix typos (#21514) Co-authored-by: Marko Co-authored-by: Julien Robert --- 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 01c1267142d1..d773ffd4ed9f 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 99725182a73c..14f906119015 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 77a08645d45f..eb4081359618 100644 --- a/server/start.go +++ b/server/start.go @@ -907,7 +907,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 ee7398518fb2..7d4db39f85ee 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 8ea641ca4b74..cb5d36e9088c 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 597742f2c611..f436b2ebda00 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{