From 5eabafac03db31526a942a593c1d42cc95bffadc Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Mon, 14 Mar 2022 20:37:59 -0600 Subject: [PATCH] style --- dagger/blocktype.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dagger/blocktype.nim b/dagger/blocktype.nim index 87d3b8e1..f9427e1d 100644 --- a/dagger/blocktype.nim +++ b/dagger/blocktype.nim @@ -39,15 +39,17 @@ func init*( hash = ? MultiHash.digest($mcodec, data).mapFailure cid = ? Cid.init(version, codec, hash).mapFailure - success Block( + # TODO: If the hash is `>=` to the data, + # use the Cid as a container! + Block( cid: cid, - data: @data) + data: @data).success func init*( T: type Block, cid: Cid, data: openArray[byte], - verify: bool = false): ?!T = + verify: bool = true): ?!T = let mhash = ? cid.mhash.mapFailure