Skip to content

Commit 09e52f4

Browse files
committed
scorex-utils 0.1.7
1 parent c990c12 commit 09e52f4

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ libraryDependencies ++= Seq(
3838
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
3939
"org.whispersystems" % "curve25519-java" % "0.5.0",
4040
"org.bouncycastle" % "bcprov-jdk15on" % "1.64",
41-
"org.scorexfoundation" %% "scorex-util" % "0.1.6"
41+
"org.scorexfoundation" %% "scorex-util" % "0.1.7"
4242
)
4343

4444
libraryDependencies ++= Seq(

src/main/scala/scorex/crypto/authds/avltree/batch/BatchAVLProver.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BatchAVLProver[D <: Digest, HF <: CryptographicHash[D]](val keyLength: Int
2929
(implicit val hf: HF = Blake2b256)
3030
extends AuthenticatedTreeOps[D] with ToStringHelper with ScorexLogging {
3131

32-
protected val labelLength = hf.DigestSize
32+
protected val labelLength: Int = hf.DigestSize
3333

3434
private[batch] var topNode: ProverNodes[D] = oldRootAndHeight.map(_._1).getOrElse({
3535
val t = new ProverLeaf(NegativeInfinityKey,
@@ -230,7 +230,7 @@ class BatchAVLProver[D <: Digest, HF <: CryptographicHash[D]](val keyLength: Int
230230
}
231231
}
232232

233-
loop(topNode, false)
233+
loop(topNode, keyFound = false)
234234
}
235235

236236
/**
@@ -442,7 +442,7 @@ class BatchAVLProver[D <: Digest, HF <: CryptographicHash[D]](val keyLength: Int
442442
var fail: Boolean = false
443443

444444
def checkTreeHelper(rNode: ProverNodes[D]): (ProverLeaf[D], ProverLeaf[D], Int) = {
445-
def myRequire(t: Boolean, s: String) = {
445+
def myRequire(t: Boolean, s: String): Unit = {
446446
if (!t) {
447447
var x = rNode.key(0).toInt
448448
if (x < 0) x = x + 256

src/main/scala/scorex/crypto/authds/avltree/batch/BatchAVLVerifier.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import scorex.crypto.authds._
55
import scorex.crypto.hash._
66
import scorex.utils.ByteArray
77

8-
import scala.collection.mutable
98
import scala.util.{Failure, Try}
109

1110
/**
@@ -33,7 +32,7 @@ class BatchAVLVerifier[D <: Digest, HF <: CryptographicHash[D]](startingDigest:
3332

3433
override val collectChangedNodes: Boolean = false
3534

36-
protected val labelLength = hf.DigestSize
35+
protected val labelLength: Int = hf.DigestSize
3736

3837
/**
3938
* Returns Some[the current digest of the authenticated data structure],
@@ -169,8 +168,7 @@ class BatchAVLVerifier[D <: Digest, HF <: CryptographicHash[D]](startingDigest:
169168
// Now reconstruct the tree from the proof, which has the post order traversal
170169
// of the tree
171170
var numNodes = 0
172-
var s = List.empty[VerifierNodes[D]]
173-
171+
var s = List.empty[VerifierNodes[D]] // Nodes and depths
174172
var i = 0
175173
var previousLeaf: Option[Leaf[D]] = None
176174
while (proof(i) != EndOfTreeInPackagedProof) {

0 commit comments

Comments
 (0)