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