Merge PR #3400: power reduction for Tendermint

* add uncompiled power functionality

* fix some compile errors

* Power -> TendermintPower

* tests rename GetTendermintPower

* test fix

* working

* fix delegation tests

* fix slash tests

* staking/keeper tests passing

* docs reversion

* debuggin workin

* x/staking test pass

* fix gov tests

* fix x/slashing tests

* working distribution test fixes

* fix distribution tests

* lint

* fix lcd tests

* fix gov test

* lint

* CLI fixes, rm stakingTypes

* typos

* working cli fixes

* cli test fix

* cli tests fixed

* testnet creation modification

* typo

* pending

* Sanitize Dec.Roundint64 (#3475)

* merge fixes

* @cwgoes comments

* fix tests

* change power reduction to 10^-6

* option to turn off minting for LCD tests
This commit is contained in:
frog power 4000
2019-02-05 21:30:48 -08:00
committed by GitHub
parent df94f522f9
commit 52f2ec71a9
56 changed files with 1159 additions and 955 deletions
+1 -1
View File
@@ -342,7 +342,7 @@ func EnsureSufficientMempoolFees(ctx sdk.Context, stdFee StdFee) sdk.Result {
glDec := sdk.NewDec(int64(stdFee.Gas))
for i, gp := range minGasPrices {
fee := gp.Amount.Mul(glDec)
requiredFees[i] = sdk.NewInt64Coin(gp.Denom, fee.Ceil().RoundInt64())
requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt())
}
if !stdFee.Amount.IsAllGTE(requiredFees) {
+1 -1
View File
@@ -177,7 +177,7 @@ func (bldr TxBuilder) Build(msgs []sdk.Msg) (StdSignMsg, error) {
fees = make(sdk.Coins, len(bldr.gasPrices))
for i, gp := range bldr.gasPrices {
fee := gp.Amount.Mul(glDec)
fees[i] = sdk.NewInt64Coin(gp.Denom, fee.Ceil().RoundInt64())
fees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt())
}
}