use on-chain params on tests + fix tests + add new tests for power reduction change

This commit is contained in:
psaradev
2021-01-28 23:54:39 +10:00
parent 4f476d6890
commit cb17feddc0
38 changed files with 322 additions and 268 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) {
func getTestingAccounts(t *testing.T, r *rand.Rand, app *simapp.SimApp, ctx sdk.Context, n int) []simtypes.Account {
accounts := simtypes.RandomAccounts(r, n)
initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)
initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200)
initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt))
// add coins to the accounts