-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!test: add genesis state for multi staking module to simapp #99
!test: add genesis state for multi staking module to simapp #99
Conversation
testing/simapp/test_helpers.go
Outdated
BondWeight: sdk.MustNewDecFromStr("0.5"), | ||
} | ||
coinInfos := []multistakingtypes.MultiStakingCoinInfo{msCoinAInfo, msCoinBInfo} | ||
validatorCoins := make([]multistakingtypes.ValidatorMultiStakingCoin, 0, len(valSet.Validators)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validatorMsCoins
testing/simapp/test_helpers.go
Outdated
Denom: testutil.MultistakingDenomB, | ||
BondWeight: sdk.MustNewDecFromStr("0.5"), | ||
} | ||
coinInfos := []multistakingtypes.MultiStakingCoinInfo{msCoinAInfo, msCoinBInfo} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msCoinInfos
testing/simapp/test_helpers.go
Outdated
|
||
bondAmt := sdk.DefaultPowerReduction | ||
for i, val := range valSet.Validators { | ||
valDenom := testutil.MultistakingDenomA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valMsDenom
testing/simapp/test_helpers.go
Outdated
if i%2 == 1 { | ||
valDenom = testutil.MultistakingDenomB | ||
} | ||
validatorCoins = append(validatorCoins, multistakingtypes.ValidatorMultiStakingCoin{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valMsCoins
testing/simapp/test_helpers.go
Outdated
ValAddr: sdk.ValAddress(val.Address).String(), | ||
CoinDenom: valDenom, | ||
}) | ||
valTokens := coinInfos[i%2].BondWeight.MulInt(bondAmt).RoundInt() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valBondCoin
Add following items to genesis state of simapp:
ario
andarst
balancesMultiStakingLocks
,MultiStakingCoinInfo
,ValidatorMultiStakingCoins
to genesis state of multi staking module