mirror of
https://github.com/logos-storage/nim-poseidon2.git
synced 2026-01-03 22:23:07 +00:00
Do not expose isBottomLayer parameter on API
This commit is contained in:
parent
70c516d93e
commit
3c8486f73c
@ -10,7 +10,7 @@ const KeyBottomLayer = F.fromHex("0x1")
|
|||||||
const KeyOdd = F.fromHex("0x2")
|
const KeyOdd = F.fromHex("0x2")
|
||||||
const KeyOddAndBottomLayer = F.fromhex("0x3")
|
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 a = low(xs)
|
||||||
let b = high(xs)
|
let b = high(xs)
|
||||||
let m = b-a+1
|
let m = b-a+1
|
||||||
@ -38,5 +38,8 @@ func merkleRoot*(xs: openArray[F], isBottomLayer: static bool = true) : F =
|
|||||||
|
|
||||||
return merkleRoot(ys, isBottomLayer = false)
|
return merkleRoot(ys, isBottomLayer = false)
|
||||||
|
|
||||||
|
func merkleRoot*(xs: openArray[F]) : F =
|
||||||
|
merkleRoot(xs, isBottomLayer = true)
|
||||||
|
|
||||||
func merkleRoot*(bytes: openArray[byte]): F =
|
func merkleRoot*(bytes: openArray[byte]): F =
|
||||||
merkleRoot(toSeq bytes.elements(F))
|
merkleRoot(toSeq bytes.elements(F))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user