diff --git a/testutil/simsx/environment.go b/testutil/simsx/environment.go index 142370364d..6a66180565 100644 --- a/testutil/simsx/environment.go +++ b/testutil/simsx/environment.go @@ -319,7 +319,7 @@ func (c ChainDataSource) HasAccount(addr string) bool { return ok } -// GetAccount return SimAccount with given bench32 address. Reporter skip flag is set when not found. +// GetAccount return SimAccount with given bech32 address. Reporter skip flag is set when not found. func (c ChainDataSource) GetAccount(reporter SimulationReporter, addr string) SimAccount { pos, ok := c.addressToAccountsPosIndex[addr] if !ok { diff --git a/x/staking/app_test.go b/x/staking/app_test.go index ba3f1109f8..4da2a91dbf 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -124,7 +124,7 @@ func TestStakingMsgs(t *testing.T) { _, _, err = simtestutil.SignCheckDeliver(t, txConfig, app.BaseApp, header, []sdk.Msg{beginUnbondingMsg}, "", []uint64{1}, []uint64{1}, true, true, priv2) require.NoError(t, err) - // delegation should exist anymore + // delegation should not exist anymore ctxCheck = app.NewContext(true) _, err = stakingKeeper.GetDelegation(ctxCheck, addr2, sdk.ValAddress(addr1)) require.ErrorIs(t, err, types.ErrNoDelegation) diff --git a/x/staking/autocli.go b/x/staking/autocli.go index 67cef2c1e8..6fbce48286 100644 --- a/x/staking/autocli.go +++ b/x/staking/autocli.go @@ -4,7 +4,7 @@ import ( "fmt" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - _ "cosmossdk.io/api/cosmos/crypto/ed25519" // register to that it shows up in protoregistry.GlobalTypes + _ "cosmossdk.io/api/cosmos/crypto/ed25519" // register so that it shows up in protoregistry.GlobalTypes stakingv1beta "cosmossdk.io/api/cosmos/staking/v1beta1" "github.com/cosmos/cosmos-sdk/version" diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 41a8762894..b8b9517811 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -41,7 +41,7 @@ func (s *KeeperTestSuite) TestDelegation() { validators[i] = stakingkeeper.TestingUpdateValidator(keeper, ctx, validators[i], true) } - // first add a validators[0] to delegate too + // first add a validators[0] to delegate to bond1to1 := stakingtypes.NewDelegation(addrDels[0].String(), valAddrs[0].String(), math.LegacyNewDec(9)) // check the empty keeper first diff --git a/x/staking/keeper/msg_server_test.go b/x/staking/keeper/msg_server_test.go index 7abdd3d459..569538a33f 100644 --- a/x/staking/keeper/msg_server_test.go +++ b/x/staking/keeper/msg_server_test.go @@ -1074,7 +1074,7 @@ func (s *KeeperTestSuite) TestMsgUpdateParams() { expErrMsg: "max validators must be positive", }, { - name: "max entries most be positive", + name: "max entries must be positive", input: &stakingtypes.MsgUpdateParams{ Authority: keeper.GetAuthority(), Params: stakingtypes.Params{ diff --git a/x/staking/keeper/unbonding.go b/x/staking/keeper/unbonding.go index 1813797b97..e932090a6f 100644 --- a/x/staking/keeper/unbonding.go +++ b/x/staking/keeper/unbonding.go @@ -70,7 +70,7 @@ func (k Keeper) SetUnbondingType(ctx context.Context, id uint64, unbondingType t return store.Set(types.GetUnbondingTypeKey(id), bz) } -// GetUnbondingDelegationByUnbondingID returns a unbonding delegation that has an unbonding delegation entry with a certain ID +// GetUnbondingDelegationByUnbondingID returns an unbonding delegation that has an unbonding delegation entry with a certain ID func (k Keeper) GetUnbondingDelegationByUnbondingID(ctx context.Context, id uint64) (ubd types.UnbondingDelegation, err error) { store := k.storeService.OpenKVStore(ctx) diff --git a/x/staking/keeper_bench_test.go b/x/staking/keeper_bench_test.go index 9766851aba..8d02ca17f0 100644 --- a/x/staking/keeper_bench_test.go +++ b/x/staking/keeper_bench_test.go @@ -28,7 +28,7 @@ import ( func BenchmarkApplyAndReturnValidatorSetUpdates(b *testing.B) { // goal of this benchmark to measure the performance changes in ApplyAndReturnValidatorSetUpdates - // for dropping the bench32 conversion and different index types. + // for dropping the bech32 conversion and different index types. // therefore the validator power, max or state is not modified to focus on comparing the valset // for an update only. const validatorCount = 150 diff --git a/x/staking/migrations/v2/store_test.go b/x/staking/migrations/v2/store_test.go index 9b9c79ec41..a7a987550d 100644 --- a/x/staking/migrations/v2/store_test.go +++ b/x/staking/migrations/v2/store_test.go @@ -10,7 +10,7 @@ import ( storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec/address" - sdktestuil "github.com/cosmos/cosmos-sdk/testutil" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v1" @@ -22,7 +22,7 @@ import ( func TestStoreMigration(t *testing.T) { stakingKey := storetypes.NewKVStoreKey("staking") tStakingKey := storetypes.NewTransientStoreKey("transient_test") - ctx := sdktestuil.DefaultContext(stakingKey, tStakingKey) + ctx := sdktestutil.DefaultContext(stakingKey, tStakingKey) store := ctx.KVStore(stakingKey) _, pk1, addr1 := testdata.KeyTestPubAddr() diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index ba59d56e12..2cb982d289 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -304,7 +304,7 @@ func SimulateMsgDelegate( } if val.InvalidExRate() { - return simtypes.NoOpMsg(types.ModuleName, msgType, "validator's invalid echange rate"), nil, nil + return simtypes.NoOpMsg(types.ModuleName, msgType, "validator's invalid exchange rate"), nil, nil } amount := bk.GetBalance(ctx, simAccount.Address, denom).Amount diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index b4db52ba04..a60331cf25 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -360,7 +360,7 @@ func (v Validator) BondedTokens() math.Int { return math.ZeroInt() } -// ConsensusPower gets the consensus-engine power. Aa reduction of 10^6 from +// ConsensusPower gets the consensus-engine power. A reduction of 10^6 from // validator tokens is applied func (v Validator) ConsensusPower(r math.Int) int64 { if v.IsBonded() { diff --git a/x/tx/signing/aminojson/any.go b/x/tx/signing/aminojson/any.go index c7e304a469..71da1c2ef1 100644 --- a/x/tx/signing/aminojson/any.go +++ b/x/tx/signing/aminojson/any.go @@ -12,7 +12,7 @@ import ( ) func marshalAny(enc *Encoder, message protoreflect.Message, writer io.Writer) error { - // when a message contains a nested any field, and the top-level message has been unmarshalled into a dyanmicpb, + // when a message contains a nested any field, and the top-level message has been unmarshalled into a dynamicpb, // the nested any field will also be a dynamicpb. In this case, we must use the dynamicpb API. _, ok := message.Interface().(*dynamicpb.Message) if ok {