fix(x/staking): correct copy-paste errors in comments (#25697)

Co-authored-by: Alex | Cosmos Labs <alex@cosmoslabs.io>
This commit is contained in:
heksan-ui 2025-12-17 18:17:11 +01:00 committed by GitHub
parent d201ca9ae4
commit d4897d1ab3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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