fix(x/staking): use overwritten default bond denom (#23233)

This commit is contained in:
Julien Robert
2025-01-07 10:40:16 +00:00
committed by GitHub
parent d0198ece4e
commit ad6a20c65e
2 changed files with 4 additions and 9 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ func getHistEntries(r *rand.Rand) uint32 {
// getKeyRotationFee returns randomized keyRotationFee between 10000-1000000.
func getKeyRotationFee(r *rand.Rand) sdk.Coin {
return sdk.NewInt64Coin(sdk.DefaultBondDenom, r.Int63n(types.DefaultKeyRotationFee.Amount.Int64()-10000)+10000)
return sdk.NewInt64Coin(sdk.DefaultBondDenom, r.Int63n(990000)+10000)
}
// RandomizedGenState generates a random GenesisState for staking
+3 -8
View File
@@ -27,13 +27,8 @@ const (
DefaultMaxEntries uint32 = 7
)
var (
// DefaultMinCommissionRate is set to 0%
DefaultMinCommissionRate = math.LegacyZeroDec()
// DefaultKeyRotationFee is fees used to rotate the ConsPubkey or Operator key
DefaultKeyRotationFee = sdk.NewInt64Coin(sdk.DefaultBondDenom, 1000000)
)
// DefaultMinCommissionRate is set to 0%
var DefaultMinCommissionRate = math.LegacyZeroDec()
// NewParams creates a new Params instance
func NewParams(unbondingTime time.Duration,
@@ -60,7 +55,7 @@ func DefaultParams() Params {
DefaultMaxEntries,
sdk.DefaultBondDenom,
DefaultMinCommissionRate,
DefaultKeyRotationFee,
sdk.NewInt64Coin(sdk.DefaultBondDenom, 1000000), // fees used to rotate the ConsPubkey or Operator key
)
}