Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using rand.New() instead of rand.Seed because it is deprecated in go 1.20 #136

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions x/feeabs/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ func (s *KeeperTestSuite) TestHostChainConfig() {
}

func randStringRunes(n int) string {
rand.Seed(time.Now().UnixNano()) //nolint:staticcheck // this is for testing
r := rand.New(rand.NewSource(time.Now().UnixNano()))
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
b[i] = letterRunes[r.Intn(len(letterRunes))]
}
return string(b)
}

func randUint64Num() uint64 {
rand.Seed(time.Now().UnixNano()) //nolint:staticcheck // this is for testing
return rand.Uint64()
r := rand.New(rand.NewSource(time.Now().UnixNano()))
return r.Uint64()
}