diff --git a/x/auth/simulation/genesis.go b/x/auth/simulation/genesis.go index 7c18882fd325..0e9f7e93eb4a 100644 --- a/x/auth/simulation/genesis.go +++ b/x/auth/simulation/genesis.go @@ -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) {