renames err to error in merkletree.nim

This commit is contained in:
Ben 2024-10-30 15:07:53 +01:00
parent 7e0328d271
commit 1bc915ea49
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B
1 changed files with 6 additions and 6 deletions

View File

@ -146,16 +146,16 @@ proc merkleTreeWorker*[H, K](
for i in 0..<halfn: for i in 0..<halfn:
const key = when isBottomLayer: K.KeyBottomLayer else: K.KeyNone const key = when isBottomLayer: K.KeyBottomLayer else: K.KeyNone
without y =? self.compress( xs[a + 2 * i], xs[a + 2 * i + 1], key = key ), err: without y =? self.compress( xs[a + 2 * i], xs[a + 2 * i + 1], key = key ), error:
return failure err return failure error
ys[i] = y ys[i] = y
await sleepAsync(1.micros) # cooperative scheduling await sleepAsync(1.micros) # cooperative scheduling
if isOdd: if isOdd:
const key = when isBottomLayer: K.KeyOddAndBottomLayer else: K.KeyOdd const key = when isBottomLayer: K.KeyOddAndBottomLayer else: K.KeyOdd
without y =? self.compress( xs[n], self.zero, key = key ), err: without y =? self.compress( xs[n], self.zero, key = key ), error:
return failure err return failure error
ys[halfn] = y ys[halfn] = y
without v =? (await self.merkleTreeWorker(ys, isBottomLayer = false)), err: without v =? (await self.merkleTreeWorker(ys, isBottomLayer = false)), error:
return failure err return failure error
success @[ @xs ] & v success @[ @xs ] & v