fix(x/auth): facultative vesting as well in simulation (#22721)
This commit is contained in:
parent
1c4dc89ead
commit
4d1adcf955
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user