Skip to content

Commit e199604

Browse files
zmanianjackzampolin
authored andcommitted
Merge PR #3574: Fixes for non-default staking token
1 parent 14c0476 commit e199604

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/gaia/app/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func GaiaAppGenState(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []js
187187

188188
for _, acc := range genesisState.Accounts {
189189
for _, coin := range acc.Coins {
190-
if coin.Denom == bondDenom {
190+
if coin.Denom == genesisState.StakingData.Params.BondDenom {
191191
stakingData.Pool.NotBondedTokens = stakingData.Pool.NotBondedTokens.
192192
Add(coin.Amount) // increase the supply
193193
}

x/staking/simulation/invariants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func SupplyInvariants(ck bank.Keeper, k staking.Keeper,
5454
loose := sdk.ZeroDec()
5555
bonded := sdk.ZeroDec()
5656
am.IterateAccounts(ctx, func(acc auth.Account) bool {
57-
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(staking.DefaultBondDenom)))
57+
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(k.BondDenom(ctx))))
5858
return false
5959
})
6060
k.IterateUnbondingDelegations(ctx, func(_ int64, ubd staking.UnbondingDelegation) bool {

0 commit comments

Comments
 (0)