From d4897d1ab392019427468f925920edf0728e016b Mon Sep 17 00:00:00 2001 From: heksan-ui <158516484+heksan-ui@users.noreply.github.com> Date: Wed, 17 Dec 2025 18:17:11 +0100 Subject: [PATCH] fix(x/staking): correct copy-paste errors in comments (#25697) Co-authored-by: Alex | Cosmos Labs --- x/staking/keeper/delegation.go | 4 ++-- x/staking/keeper/slash.go | 2 +- x/staking/keeper/unbonding.go | 2 +- x/staking/types/validator.go | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index d8172f88d1..bf5e623513 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -679,8 +679,8 @@ func (k Keeper) SetRedelegation(ctx context.Context, red types.Redelegation) err return store.Set(types.GetREDByValDstIndexKey(delegatorAddress, valSrcAddr, valDestAddr), []byte{}) } -// SetRedelegationEntry adds an entry to the unbonding delegation at the given -// addresses. It creates the unbonding delegation if it does not exist. +// SetRedelegationEntry adds an entry to the redelegation at the given +// addresses. It creates the redelegation if it does not exist. func (k Keeper) SetRedelegationEntry(ctx context.Context, delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress, creationHeight int64, diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 5818570784..2d2f04ba9f 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -287,7 +287,7 @@ func (k Keeper) SlashUnbondingDelegation(ctx context.Context, unbondingDelegatio // SlashRedelegation slashes a redelegation and update the pool // return the amount that would have been slashed assuming -// the unbonding delegation had enough stake to slash +// the redelegation had enough stake to slash // (the amount actually slashed may be less if there's // insufficient stake remaining) // NOTE this is only slashing for prior infractions from the source validator diff --git a/x/staking/keeper/unbonding.go b/x/staking/keeper/unbonding.go index e932090a6f..aecc21f499 100644 --- a/x/staking/keeper/unbonding.go +++ b/x/staking/keeper/unbonding.go @@ -101,7 +101,7 @@ func (k Keeper) GetUnbondingDelegationByUnbondingID(ctx context.Context, id uint return ubd, nil } -// GetRedelegationByUnbondingID returns a unbonding delegation that has an unbonding delegation entry with a certain ID +// GetRedelegationByUnbondingID returns a redelegation that has a redelegation entry with a certain ID func (k Keeper) GetRedelegationByUnbondingID(ctx context.Context, id uint64) (red types.Redelegation, err error) { store := k.storeService.OpenKVStore(ctx) diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 7345101c2f..d827ead008 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -151,12 +151,12 @@ func (v Validators) UnpackInterfaces(c codectypes.AnyUnpacker) error { return nil } -// MustMarshalValidator returns the redelegation +// MustMarshalValidator returns the validator bytes func MustMarshalValidator(cdc codec.BinaryCodec, validator *Validator) []byte { return cdc.MustMarshal(validator) } -// MustUnmarshalValidator unmarshals a redelegation from a store value +// MustUnmarshalValidator unmarshals a validator from a store value func MustUnmarshalValidator(cdc codec.BinaryCodec, value []byte) Validator { validator, err := UnmarshalValidator(cdc, value) if err != nil { @@ -166,7 +166,7 @@ func MustUnmarshalValidator(cdc codec.BinaryCodec, value []byte) Validator { return validator } -// UnmarshalValidator unmarshals a redelegation from a store value +// UnmarshalValidator unmarshals a validator from a store value func UnmarshalValidator(cdc codec.BinaryCodec, value []byte) (v Validator, err error) { err = cdc.Unmarshal(value, &v) return v, err