Skip to content

Commit

Permalink
fix: use new rand
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Nov 20, 2023
1 parent 20b0e4a commit 284c410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/messagepool/block_proba_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ func TestBlockProbability(t *testing.T) {
func TestWinnerProba(t *testing.T) {
tf.UnitTest(t)

rand.New(rand.NewSource(time.Now().UnixNano()))
r := rand.New(rand.NewSource(time.Now().UnixNano()))
const N = 1000000
winnerProba := noWinnersProb()
sum := 0
for i := 0; i < N; i++ {
minersRand := rand.Float64()
minersRand := r.Float64()
j := 0
for ; j < MaxBlocks; j++ {
minersRand -= winnerProba[j]
Expand Down

0 comments on commit 284c410

Please sign in to comment.