From 145aa5d84a10795b45092b05bb6ae37fee5bd4e7 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 8 Jan 2025 08:45:15 +0100 Subject: [PATCH] chore: remove old fixme (#1060) * Remove FIXME * Fix indentation --- codex/node.nim | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/codex/node.nim b/codex/node.nim index a43c9270a..7faf89e51 100644 --- a/codex/node.nim +++ b/codex/node.nim @@ -249,26 +249,18 @@ proc streamEntireDataset( if manifest.protected: # Retrieve, decode and save to the local store all EС groups proc erasureJob(): Future[?!void] {.async.} = - try: - # Spawn an erasure decoding job - let - erasure = Erasure.new( - self.networkStore, - leoEncoderProvider, - leoDecoderProvider, - self.taskpool) - without _ =? (await erasure.decode(manifest)), error: - error "Unable to erasure decode manifest", manifestCid, exc = error.msg - return failure(error) - - return success() - # -------------------------------------------------------------------------- - # FIXME this is a HACK so that the node does not crash during the workshop. - # We should NOT catch Defect. - except Exception as exc: - trace "Exception decoding manifest", manifestCid, exc = exc.msg - return failure(exc.msg) - # -------------------------------------------------------------------------- + # Spawn an erasure decoding job + let + erasure = Erasure.new( + self.networkStore, + leoEncoderProvider, + leoDecoderProvider, + self.taskpool) + without _ =? (await erasure.decode(manifest)), error: + error "Unable to erasure decode manifest", manifestCid, exc = error.msg + return failure(error) + + return success() if err =? (await erasureJob()).errorOption: return failure(err) @@ -428,15 +420,6 @@ proc setupRequest( trace "Unable to fetch manifest for cid" return failure error - # ---------------------------------------------------------------------------- - # FIXME this is a BAND-AID to address - # https://github.com/codex-storage/nim-codex/issues/852 temporarily for the - # workshop. Remove this once we get that fixed. - if manifest.blocksCount.uint == ecK: - return failure("Cannot setup slots for a dataset with ecK == numBlocks. Please use a larger file or a different combination of `nodes` and `tolerance`.") - # ---------------------------------------------------------------------------- - - # Erasure code the dataset according to provided parameters let erasure = Erasure.new(