diff --git a/src/Zenith/Core.hs b/src/Zenith/Core.hs index 2dd74f2..45422ee 100644 --- a/src/Zenith/Core.hs +++ b/src/Zenith/Core.hs @@ -125,7 +125,16 @@ getCommitmentTrees :: getCommitmentTrees pool nodeHost nodePort znet block = do bh' <- getBlockHash pool block znet case bh' of - Nothing -> throwIO $ userError "couldn't get block hash" + Nothing -> do + r <- + makeZebraCall + nodeHost + nodePort + "z_gettreestate" + [Data.Aeson.String $ T.pack $ show block] + case r of + Left e -> throwIO $ userError e + Right zti -> return zti Just bh -> do r <- makeZebraCall