From 8aaff32b4669366ca468ef7eaf04e730412ab95d Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:39:05 +1100 Subject: [PATCH] fix macos compilation error --- codex/merkletree/poseidon2.nim | 4 ++-- codex/utils/poseidon2digest.nim | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codex/merkletree/poseidon2.nim b/codex/merkletree/poseidon2.nim index 588758d4..7ecc135b 100644 --- a/codex/merkletree/poseidon2.nim +++ b/codex/merkletree/poseidon2.nim @@ -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 diff --git a/codex/utils/poseidon2digest.nim b/codex/utils/poseidon2digest.nim index 3960ca0c..a2817fbb 100644 --- a/codex/utils/poseidon2digest.nim +++ b/codex/utils/poseidon2digest.nim @@ -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