fix(x/staking): correct copy-paste errors in comments (#25697)
Co-authored-by: Alex | Cosmos Labs <alex@cosmoslabs.io>
This commit is contained in:
parent
d201ca9ae4
commit
d4897d1ab3
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user