fix(x/auth): ensure the elements of do not exceed 1000 (#24208)

This commit is contained in:
Đông Liều 2025-03-31 21:07:45 +07:00 committed by GitHub
parent 4f445ed933
commit cc14f21cef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,10 @@ func (suite *DeterministicTestSuite) createAndSetAccounts(t *rapid.T, count int)
accs := make([]sdk.AccountI, 0, count)
// We need all generated account-numbers unique
accNums := rapid.SliceOfNDistinct(rapid.Uint64(), count, count, func(i uint64) uint64 {
if count >= 1000 {
suite.T().Fatal("count must be less than 1000")
}
accNums := rapid.SliceOfNDistinct(rapid.Uint64Range(0, 999), count, count, func(i uint64) uint64 {
return i
}).Draw(t, "acc-nums")