refactor(vesting)!: improve validate functions and return error in constructor (#16741)

This commit is contained in:
Julien Robert
2023-06-29 10:51:04 +00:00
committed by GitHub
parent a30afc4e9d
commit adc7451ad7
10 changed files with 246 additions and 137 deletions
+4 -1
View File
@@ -47,7 +47,10 @@ func RandomGenesisAccounts(simState *module.SimulationState) types.GenesisAccoun
endTime = int64(simulation.RandIntBetween(simState.Rand, int(startTime)+1, int(startTime+(60*60*12))))
}
bva := vestingtypes.NewBaseVestingAccount(bacc, initialVesting, endTime)
bva, err := vestingtypes.NewBaseVestingAccount(bacc, initialVesting, endTime)
if err != nil {
panic(err)
}
if simState.Rand.Intn(100) < 50 {
genesisAccs[i] = vestingtypes.NewContinuousVestingAccountRaw(bva, startTime)