From 0f01c9c965d5ec9453356aa5682bc3b9fe5cf8bf Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 28 May 2025 19:19:56 -0600 Subject: [PATCH] Avoid using pointer to task, use the actual task object. Add some checked exceptions --- codex/erasure/erasure.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/codex/erasure/erasure.nim b/codex/erasure/erasure.nim index e3d618ea..472c2754 100644 --- a/codex/erasure/erasure.nim +++ b/codex/erasure/erasure.nim @@ -358,7 +358,7 @@ proc asyncEncode*( proc encodeData( self: Erasure, manifest: Manifest, params: EncodingParams -): Future[?!Manifest] {.async.} = +): Future[?!Manifest] {.async: (raises: [CancelledError]).} = ## Encode blocks pointed to by the protected manifest ## ## `manifest` - the manifest to encode @@ -457,7 +457,7 @@ proc encode*( blocks: Natural, parity: Natural, strategy = SteppedStrategy, -): Future[?!Manifest] {.async.} = +): Future[?!Manifest] {.async: (raises: [CancelledError]).} = ## Encode a manifest into one that is erasure protected. ## ## `manifest` - the original manifest to be encoded @@ -548,7 +548,9 @@ proc asyncDecode*( success() -proc decode*(self: Erasure, encoded: Manifest): Future[?!Manifest] {.async.} = +proc decode*( + self: Erasure, encoded: Manifest +): Future[?!Manifest] {.async: (raises: [CancelledError]).} = ## Decode a protected manifest into it's original ## manifest ##