Use InflateSupply instead
This commit is contained in:
parent
1afb5bf9d2
commit
dc13a0c61d
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue