* Revert "feat: staking config (#10988)"
This reverts commit 5e9656f363.
* remove docs
This commit is contained in:
@@ -116,9 +116,9 @@ func DefaultConfig() Config {
|
||||
NumValidators: 4,
|
||||
BondDenom: sdk.DefaultBondDenom,
|
||||
MinGasPrices: fmt.Sprintf("0.000006%s", sdk.DefaultBondDenom),
|
||||
AccountTokens: sdk.NewIntFromUint64(1000_000_000),
|
||||
StakingTokens: sdk.NewIntFromUint64(500_000_000),
|
||||
BondedTokens: sdk.NewIntFromUint64(100_000_000),
|
||||
AccountTokens: sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction),
|
||||
StakingTokens: sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction),
|
||||
BondedTokens: sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction),
|
||||
PruningStrategy: storetypes.PruningOptionNothing,
|
||||
CleanupDir: true,
|
||||
SigningAlgo: string(hd.Secp256k1Type),
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package testutil
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
var DefaultpowerReduction = sdk.NewInt(1_000_000)
|
||||
|
||||
// TokensToConsensusPower - convert input tokens to Power
|
||||
func TokensToConsensusPower(tokens sdk.Int, powerReduction sdk.Int) int64 {
|
||||
if tokens.IsNil() || powerReduction.IsNil() || powerReduction.IsZero() {
|
||||
return 0
|
||||
}
|
||||
|
||||
power := tokens.Quo(powerReduction)
|
||||
|
||||
if power.GT(sdk.NewIntFromUint64(math.MaxInt64)) {
|
||||
return 0
|
||||
}
|
||||
return power.Int64()
|
||||
}
|
||||
|
||||
// TokensFromConsensusPower - convert input power to tokens
|
||||
func TokensFromConsensusPower(power int64, powerReduction sdk.Int) sdk.Int {
|
||||
return sdk.NewInt(power).Mul(powerReduction)
|
||||
}
|
||||
Reference in New Issue
Block a user