From bff10de82878e1c215dba79c5ee037dcac5c0c08 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 6 Mar 2024 11:37:22 +0100 Subject: [PATCH] ipns: fix test by using global random reader --- ipns/record_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipns/record_test.go b/ipns/record_test.go index db92a6a17..6ab1d5994 100644 --- a/ipns/record_test.go +++ b/ipns/record_test.go @@ -2,6 +2,7 @@ package ipns import ( "bytes" + "crypto/rand" "testing" "time" @@ -30,8 +31,7 @@ func init() { } func mustKeyPair(t *testing.T, typ int) (ic.PrivKey, ic.PubKey, Name) { - sr := util.NewTimeSeededRand() - sk, pk, err := ic.GenerateKeyPairWithReader(typ, 2048, sr) + sk, pk, err := ic.GenerateKeyPairWithReader(typ, 2048, rand.Reader) require.NoError(t, err) pid, err := peer.IDFromPublicKey(pk)