mirror of https://github.com/voidlizard/hbs2
read objects by ref
This commit is contained in:
parent
05e8ccdcfc
commit
0ebfe367b0
|
@ -90,9 +90,9 @@ runCat opts ss = do
|
||||||
|
|
||||||
mhash <- MaybeT $ pure $ uniLastMay @MerkleHash opts <&> fromMerkleHash
|
mhash <- MaybeT $ pure $ uniLastMay @MerkleHash opts <&> fromMerkleHash
|
||||||
|
|
||||||
some <- MaybeT $ getBlock ss mhash
|
obj <- MaybeT $ getBlock ss mhash
|
||||||
|
|
||||||
let mbLink = deserialiseOrFail @AnnotatedHashRef some
|
let mbLink = deserialiseOrFail @AnnotatedHashRef obj
|
||||||
|
|
||||||
realHash <- MaybeT $ case mbLink of
|
realHash <- MaybeT $ case mbLink of
|
||||||
Left _ -> pure $ Just mhash
|
Left _ -> pure $ Just mhash
|
||||||
|
|
Loading…
Reference in New Issue