From 6acb091279e6946d70b2029a66fdb6a43969a1a2 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Tue, 1 Aug 2023 18:07:56 -0700 Subject: [PATCH] catch error handling --- codex/blocktype.nim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/codex/blocktype.nim b/codex/blocktype.nim index 060eff1e..a32db2da 100644 --- a/codex/blocktype.nim +++ b/codex/blocktype.nim @@ -118,11 +118,7 @@ proc isEmpty*(blk: Block): bool = blk.cid.isEmpty proc emptyBlock*(cid: Cid): Block = - EmptyBlock[cid.cidver] - .catch - .get()[cid.mhash.get().mcodec] - .catch - .get() + emptyBlock(cid.cidver, cid.mhash.get().mcodec).get() proc `$`*(b: Block): string = result &= "cid: " & $b.cid