diff --git a/test/Generators.hs b/test/Generators.hs index dce979026b6ddd1a8ceea3816d5af9edb89d3661..c6eb994f398ad87262fc6466aba4600fc3de57b2 100644 --- a/test/Generators.hs +++ b/test/Generators.hs @@ -64,8 +64,8 @@ shares = do -- memory (and even if they didn't, they would be constrained by disk -- space and speed) and maxBound :: Int64 is a lot of bytes... let maxSize = 65536 - shareBlockSize <- Gen.integral (Range.linear 1 maxSize) - numBlocks <- Gen.integral (Range.linear 1 32) + shareBlockSize <- Gen.integral (Range.exponential 1 maxSize) + numBlocks <- Gen.integral (Range.exponential 1 32) -- We don't make shareDataSize agree with the rest of the share data -- because the field is supposedly unused so everyone should just ignore @@ -79,10 +79,10 @@ shares = do -- XXX These merkle trees and the "needed hashes" list all have a size -- that really needs to be dictated by the encoding parameters (k and n). - sharePlaintextHashTree <- merkleTrees (Range.linear 1 256) - shareCrypttextHashTree <- merkleTrees (Range.linear 1 256) - shareBlockHashTree <- merkleTrees (Range.linear 1 256) - shareNeededHashes <- Gen.list (Range.linear 1 100) ((,) <$> Gen.integral (Range.linear 1 255) <*> Gen.bytes (Range.singleton 32)) + sharePlaintextHashTree <- merkleTrees (Range.exponential 1 256) + shareCrypttextHashTree <- merkleTrees (Range.exponential 1 256) + shareBlockHashTree <- merkleTrees (Range.exponential 1 256) + shareNeededHashes <- Gen.list (Range.exponential 1 100) ((,) <$> Gen.integral (Range.exponential 1 255) <*> Gen.bytes (Range.singleton 32)) -- XXX A valid share will have a URI extension that agrees with some of -- the other fields we've just generated, which we're not even trying to