Skip to content

Commit

Permalink
debug cut query
Browse files Browse the repository at this point in the history
  • Loading branch information
giantimi committed Jun 3, 2024
1 parent dba706b commit a5e18e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion exec/TXG.hs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,13 @@ queryCut mgr (HostAddress h p) version = do
let url = "https://" <> hostnameToText h <> ":" <> portToText p <> "/chainweb/0.0/" <> chainwebVersionToText version <> "/cut"
req <- parseRequest $ T.unpack url
res <- handleRequest req mgr
pure $ responseBody <$> res
case res of
Left err -> do
putStrLn $ "Error: " <> show err
pure $ Left err
Right response -> do
putStrLn $ "Response: " <> show response
pure $ Right $ responseBody response

handleRequest :: Request -> Manager -> IO (Either ApiError (Response LB.ByteString))
handleRequest req mgr = do
Expand Down

0 comments on commit a5e18e1

Please sign in to comment.