fix: multiple typos of different importance (#25060)

This commit is contained in:
emmmm 2025-07-31 10:10:19 -04:00 committed by GitHub
parent a86597e99c
commit e434dc7aab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 12 additions and 12 deletions

View File

@ -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 {

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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{

View File

@ -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)

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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() {

View File

@ -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 {