From 1560df69138b924d6119625c71a0e74b040b4c24 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 4 Mar 2024 20:43:10 +0300 Subject: [PATCH] *: add nolint comment to deprecated math/rand usages They are used in tests only. Signed-off-by: Anna Shaleva --- internal/random/random_util.go | 1 + pkg/network/fuzz_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/random/random_util.go b/internal/random/random_util.go index 529f6947f..282af57c9 100644 --- a/internal/random/random_util.go +++ b/internal/random/random_util.go @@ -50,5 +50,6 @@ func Uint160() util.Uint160 { } func init() { + //nolint:staticcheck rand.Seed(time.Now().UTC().UnixNano()) } diff --git a/pkg/network/fuzz_test.go b/pkg/network/fuzz_test.go index a0e5f5ccb..7a5e89d79 100644 --- a/pkg/network/fuzz_test.go +++ b/pkg/network/fuzz_test.go @@ -11,6 +11,7 @@ import ( func FuzzMessageDecode(f *testing.F) { for i := 0; i < 100; i++ { seed := make([]byte, rand.Uint32()%1000) + //nolint:staticcheck rand.Read(seed) f.Add(seed) }