Do not expose isBottomLayer parameter on API

This commit is contained in:
Mark Spanbroek 2023-11-13 14:12:28 +01:00 committed by markspanbroek
parent 4bd56bb839
commit a311828b9e

View File

@ -10,7 +10,7 @@ const KeyBottomLayer = F.fromHex("0x1")
const KeyOdd = F.fromHex("0x2")
const KeyOddAndBottomLayer = F.fromhex("0x3")
func merkleRoot*(xs: openArray[F], isBottomLayer: static bool = true) : F =
func merkleRoot(xs: openArray[F], isBottomLayer: static bool) : F =
let a = low(xs)
let b = high(xs)
let m = b-a+1
@ -38,5 +38,8 @@ func merkleRoot*(xs: openArray[F], isBottomLayer: static bool = true) : F =
return merkleRoot(ys, isBottomLayer = false)
func merkleRoot*(xs: openArray[F]) : F =
merkleRoot(xs, isBottomLayer = true)
func merkleRoot*(bytes: openArray[byte]): F =
merkleRoot(toSeq bytes.elements(F))