Skip to content

Commit

Permalink
Do not use isNew flag as recusrion cut-off in BatchAVLProver.resetNew
Browse files Browse the repository at this point in the history
  • Loading branch information
knizhnik committed Jun 14, 2021
1 parent fed5508 commit 811db08
Showing 1 changed file with 7 additions and 9 deletions.
Expand Up @@ -296,16 +296,14 @@ class BatchAVLProver[D <: Digest, HF <: CryptographicHash[D]](val keyLength: Int

// Recursively reset the new flags
def resetNew(r: ProverNodes[D]): Unit = {
if (r.isNew) {
r match {
case rn: InternalProverNode[D] =>
resetNew(rn.left)
resetNew(rn.right)
case _ =>
}
r.isNew = false
r.visited = false
r match {
case rn: InternalProverNode[D] =>
resetNew(rn.left)
resetNew(rn.right)
case _ =>
}
r.isNew = false
r.visited = false
}

packTree(oldTopNode)
Expand Down

0 comments on commit 811db08

Please sign in to comment.