Skip to content

Commit

Permalink
fix(x/auth): facultative vesting as well in simulation (backport #22721
Browse files Browse the repository at this point in the history
…) (#22726)

Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
mergify[bot] and julienrbrt authored Dec 3, 2024
1 parent 76f8af9 commit c695ed8
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 c695ed8

Please sign in to comment.