GCSTest fix (#845)

* Raised the min p value in GCSTest to avoid large x/2^p values which cause long unary to happen

* Lowered upper bound to 50
This commit is contained in:
Nadav Kohen 2019-10-31 06:21:23 -05:00 committed by Chris Stewart
parent 310ccbb838
commit ec38acbeb8

View file

@ -189,7 +189,7 @@ class GCSTest extends BitcoinSUnitTest {
def items: Gen[(Vector[UInt64], UInt8)] = {
NumberGenerator.genP.flatMap { p =>
Gen.choose(1, 250).flatMap { size =>
Gen.choose(10, 50).flatMap { size =>
// If hash's quotient when divided by 2^p is too large, we hang converting to unary
val upperBound: Long = 1L << (p.toInt * 1.75).toInt