Skip to content

Commit

Permalink
fix(x/auth): facultative vesting as well in simulation (#22721)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Dec 3, 2024
1 parent 1c4dc89 commit 4d1adcf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x/auth/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4d1adcf

Please sign in to comment.