Skip to content

Commit

Permalink
chore: remove old fixme (#1060)
Browse files Browse the repository at this point in the history
* Remove FIXME

* Fix indentation
  • Loading branch information
2-towns authored Jan 8, 2025
1 parent 0badcb6 commit 145aa5d
Showing 1 changed file with 12 additions and 29 deletions.
41 changes: 12 additions & 29 deletions codex/node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 145aa5d

Please sign in to comment.