Use InflateSupply instead

This commit is contained in:
Christopher Goes 2018-10-19 23:06:18 +02:00
parent 1afb5bf9d2
commit dc13a0c61d
2 changed files with 1 additions and 6 deletions

View File

@ -21,8 +21,6 @@ func BeginBlocker(ctx sdk.Context, k Keeper) {
minter.InflationLastTime = blockTime
minter, mintedCoin := minter.ProcessProvisions(params, totalSupply, bondedRatio)
k.fck.AddCollectedFees(ctx, sdk.Coins{mintedCoin})
pool := k.sk.GetPool(ctx)
pool.LooseTokens = pool.LooseTokens.Add(sdk.NewDecFromInt(mintedCoin.Amount))
k.sk.SetPool(ctx, pool)
k.sk.InflateSupply(ctx, sdk.NewDecFromInt(mintedCoin.Amount))
k.SetMinter(ctx, minter)
}

View File

@ -2,13 +2,10 @@ package mint
import (
sdk "github.com/cosmos/cosmos-sdk/types"
stake "github.com/cosmos/cosmos-sdk/x/stake"
)
// expected stake keeper
type StakeKeeper interface {
GetPool(ctx sdk.Context) stake.Pool
SetPool(ctx sdk.Context, pool stake.Pool)
TotalPower(ctx sdk.Context) sdk.Dec
BondedRatio(ctx sdk.Context) sdk.Dec
InflateSupply(ctx sdk.Context, newTokens sdk.Dec)