Skip to content

Commit

Permalink
ipns: fix test by using global random reader
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Mar 19, 2024
1 parent 2559ec2 commit bff10de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ipns/record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ipns

import (
"bytes"
"crypto/rand"
"testing"
"time"

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bff10de

Please sign in to comment.