Skip to content

Commit

Permalink
randomwalk test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Aug 9, 2018
1 parent bf286da commit f372cc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class BatchAVLProver[D <: Digest, HF <: CryptographicHash[D]](val keyLength: Int
/**
*
* @param rand - source of randomness
* @return Random leaf from the tree, that is not positive or negative infinity
* @return Random leaf from the tree that is not positive or negative infinity
*/
def randomWalk(rand: Random = new Random): Option[(ADKey, ADValue)] = {
def internalNodeFn(r: InternalProverNode[D], dummy: Unit.type) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ class AVLBatchSpecification extends PropSpec with GeneratorDrivenPropertyChecks
forAll { seed: Long =>
val e1 = prover.randomWalk(new scala.util.Random(seed))
val e2 = prover.randomWalk(new scala.util.Random(seed))
e1.get._1 shouldEqual e2.get._1
e1.get._2 shouldEqual e2.get._2
e1.map(_._1) shouldEqual e2.map(_._1)
e1.map(_._2) shouldEqual e2.map(_._2)
}
}

Expand Down

0 comments on commit f372cc7

Please sign in to comment.