Make the doublesha256digest generator more random (#371)

This commit is contained in:
Chris Stewart 2019-03-04 15:21:38 -06:00 committed by GitHub
parent 1ffeb73cd8
commit 7e9f4362bf

View File

@ -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
/**