fix macos compilation error
This commit is contained in:
parent
1bc915ea49
commit
8aaff32b46
|
@ -84,8 +84,8 @@ proc init*(
|
||||||
var
|
var
|
||||||
self = Poseidon2Tree(compress: compressor, zero: Poseidon2Zero)
|
self = Poseidon2Tree(compress: compressor, zero: Poseidon2Zero)
|
||||||
|
|
||||||
without l =? (await merkleTreeWorker(self, leaves, isBottomLayer = true)), err:
|
without l =? (await merkleTreeWorker(self, leaves, isBottomLayer = true)), error:
|
||||||
return failure err
|
return failure error
|
||||||
self.layers = l
|
self.layers = l
|
||||||
success self
|
success self
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ proc digestTree*(
|
||||||
while index < bytes.len:
|
while index < bytes.len:
|
||||||
let start = index
|
let start = index
|
||||||
let finish = min(index + chunkSize, bytes.len)
|
let finish = min(index + chunkSize, bytes.len)
|
||||||
without digest =? Poseidon2Hash.spongeDigest(bytes.toOpenArray(start, finish - 1), 2), err:
|
without digest =? Poseidon2Hash.spongeDigest(bytes.toOpenArray(start, finish - 1), 2), error:
|
||||||
return failure err
|
return failure error
|
||||||
leaves.add(digest)
|
leaves.add(digest)
|
||||||
index += chunkSize
|
index += chunkSize
|
||||||
await sleepAsync(1.nanos) # cooperative scheduling
|
await sleepAsync(1.nanos) # cooperative scheduling
|
||||||
|
|
Loading…
Reference in New Issue