fix(x/auth): facultative vesting as well in simulation (#22721)

This commit is contained in:
Julien Robert
2024-12-03 08:32:13 +00:00
committed by GitHub
parent 1c4dc89ead
commit 4d1adcf955
+7
View File
@@ -26,6 +26,13 @@ func RandomGenesisAccounts(simState *module.SimulationState) types.GenesisAccoun
for i, acc := range simState.Accounts {
bacc := types.NewBaseAccountWithAddress(acc.Address)
// check if vesting module is enabled
// if not, just use base account
if _, ok := simState.GenState["vesting"]; !ok {
genesisAccs[i] = bacc
continue
}
// Only consider making a vesting account once the initial bonded validator
// set is exhausted due to needing to track DelegatedVesting.
if !(int64(i) > simState.NumBonded && simState.Rand.Intn(100) < 50) {