Skip to content

Commit

Permalink
Merge PR #3574: Fixes for non-default staking token
Browse files Browse the repository at this point in the history
  • Loading branch information
zmanian authored and jackzampolin committed Feb 9, 2019
1 parent 14c0476 commit e199604
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/gaia/app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func GaiaAppGenState(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []js

for _, acc := range genesisState.Accounts {
for _, coin := range acc.Coins {
if coin.Denom == bondDenom {
if coin.Denom == genesisState.StakingData.Params.BondDenom {
stakingData.Pool.NotBondedTokens = stakingData.Pool.NotBondedTokens.
Add(coin.Amount) // increase the supply
}
Expand Down
2 changes: 1 addition & 1 deletion x/staking/simulation/invariants.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func SupplyInvariants(ck bank.Keeper, k staking.Keeper,
loose := sdk.ZeroDec()
bonded := sdk.ZeroDec()
am.IterateAccounts(ctx, func(acc auth.Account) bool {
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(staking.DefaultBondDenom)))
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(k.BondDenom(ctx))))
return false
})
k.IterateUnbondingDelegations(ctx, func(_ int64, ubd staking.UnbondingDelegation) bool {
Expand Down

0 comments on commit e199604

Please sign in to comment.