From cc14f21cefc614938e1efa843136baa25baeccd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=B4ng=20Li=E1=BB=81u?= <93205232+DongLieu@users.noreply.github.com> Date: Mon, 31 Mar 2025 21:07:45 +0700 Subject: [PATCH] fix(x/auth): ensure the elements of do not exceed 1000 (#24208) --- x/auth/keeper/deterministic_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index 630fa173fd..879b2e0bc9 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -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")