fix macos compilation error

This commit is contained in:
Eric 2024-10-31 11:39:05 +11:00
parent 1bc915ea49
commit 8aaff32b46
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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