Attach decode to Manifest

This commit is contained in:
Dmitriy Ryajov 2022-01-12 18:30:18 -06:00
parent 663366a1a9
commit 987a9956ec
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -131,7 +131,7 @@ proc encode*(b: var BlocksManifest): ?!seq[byte] =
return pbNode.buffer.success
proc decode*(_: type BlocksManifest, data: openArray[byte]): ?!Manifest =
proc decode*(_: type Manifest, data: openArray[byte]): ?!Manifest =
## Decode a manifest from a data blob
##
@ -184,7 +184,7 @@ proc init*(
##
let
manifest = ? BlocksManifest.decode(data)
manifest = ? Manifest.decode(data)
cid = !manifest.cid
mhash = ? cid.mhash.mapFailure