revert: Revert "feat: staking config (#10988)" (#11446)

* Revert "feat: staking config (#10988)"

This reverts commit 5e9656f363.

* remove docs
This commit is contained in:
Marko
2022-03-24 12:26:25 +01:00
committed by GitHub
parent d7ba5d2d9c
commit 66ca3e88aa
46 changed files with 139 additions and 190 deletions
+3 -3
View File
@@ -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),
-28
View File
@@ -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)
}