[input-output-hk/cardano-sl] [CBR-322] Tests for block metadata (#3317)

parsonsmatt commented on this pull request.

> mkWallet :: Hash h Addr => Ours Addr -> Transaction h Addr -> Wallet h Addr
mkWallet = walletBoot Full.walletEmpty

+ — | Translates the DSL BlockMeta’ value to BlockMeta
+ intBlockMeta :: forall h. (Hash h Addr, Interpret h (BlockMeta’ h))
+ => IntCtxt h
+ -> (BlockMeta’ h)
+ -> TranslateT IntException IO BlockMeta
+ intBlockMeta intCtxt a = do
+ ma’ <- catchTranslateErrors $ runIntT' intCtxt $ int a + case ma' of + Left err -> liftIO $ throwM err

Is the intent to throw the exception in `IO`? It seems like `TranslateT` has some means of carrying exception/error information.

Добавить комментарий