Skip to content

Commit

Permalink
Using rand.New() instead of rand.Seed because it is deprecated. (#136)
Browse files Browse the repository at this point in the history
Co-authored-by: Duong Minh Ngoc <[email protected]>
  • Loading branch information
tnv1 and minhngoc274 authored Jan 24, 2024
1 parent bc5ac95 commit 48c01fc
Showing 1 changed file with 4 additions and 4 deletions.
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()
}

0 comments on commit 48c01fc

Please sign in to comment.