*: add nolint comment to deprecated math/rand usages

They are used in tests only.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-03-04 20:43:10 +03:00
parent 0c6627f13d
commit 1560df6913
2 changed files with 2 additions and 0 deletions

View file

@ -50,5 +50,6 @@ func Uint160() util.Uint160 {
} }
func init() { func init() {
//nolint:staticcheck
rand.Seed(time.Now().UTC().UnixNano()) rand.Seed(time.Now().UTC().UnixNano())
} }

View file

@ -11,6 +11,7 @@ import (
func FuzzMessageDecode(f *testing.F) { func FuzzMessageDecode(f *testing.F) {
for i := 0; i < 100; i++ { for i := 0; i < 100; i++ {
seed := make([]byte, rand.Uint32()%1000) seed := make([]byte, rand.Uint32()%1000)
//nolint:staticcheck
rand.Read(seed) rand.Read(seed)
f.Add(seed) f.Add(seed)
} }