From 7e9f4362bf90e98ef95df5750274b2b092285de3 Mon Sep 17 00:00:00 2001 From: Chris Stewart Date: Mon, 4 Mar 2019 15:21:38 -0600 Subject: [PATCH] Make the doublesha256digest generator more random (#371) --- .../org/bitcoins/testkit/core/gen/CryptoGenerators.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testkit/src/main/scala/org/bitcoins/testkit/core/gen/CryptoGenerators.scala b/testkit/src/main/scala/org/bitcoins/testkit/core/gen/CryptoGenerators.scala index 455f8722ee..dd1979f3c0 100644 --- a/testkit/src/main/scala/org/bitcoins/testkit/core/gen/CryptoGenerators.scala +++ b/testkit/src/main/scala/org/bitcoins/testkit/core/gen/CryptoGenerators.scala @@ -174,8 +174,8 @@ sealed abstract class CryptoGenerators { /** Generates a random [[org.bitcoins.core.crypto.DoubleSha256Digest DoubleSha256Digest]] */ def doubleSha256Digest: Gen[DoubleSha256Digest] = for { - hex <- StringGenerators.hexString - digest = CryptoUtil.doubleSHA256(hex) + key <- privateKey + digest = CryptoUtil.doubleSHA256(key.bytes) } yield digest /**