Skip to content

Commit

Permalink
Remove HasCallstack
Browse files Browse the repository at this point in the history
- It caused one test to fail and from the error outcome I could not
see the actuall stack trace printed.
  • Loading branch information
v0d1ch committed Jun 27, 2023
1 parent 305e3d6 commit 39b3e5c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions hydra-cluster/src/HydraNode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,9 @@ waitForAll tracer delay nodes expected = do
tryNext c msgs stillExpected

-- | Create a commit tx using the hydra-node for later submission
externalCommit' :: HasCallStack => HydraClient -> UTxO' TxOutWithWitness -> IO Tx
externalCommit' HydraClient{hydraNodeId} utxos = do
eCommitTx <- try $ runReq defaultHttpConfig request <&> responseBody
case eCommitTx of
Left (e :: HttpException) -> failure $ "Failed to draft commit tx: " <> show e
Right DraftCommitTxResponse{commitTx} -> pure commitTx
externalCommit' :: HydraClient -> UTxO' TxOutWithWitness -> IO Tx
externalCommit' HydraClient{hydraNodeId} utxos =
runReq defaultHttpConfig request <&> commitTx . responseBody
where
request =
Req.req
Expand All @@ -179,7 +176,7 @@ externalCommit' HydraClient{hydraNodeId} utxos = do
(Req.port $ 4000 + hydraNodeId)

-- | Helper to make it easy to externally commit non-script utxo
externalCommit :: HasCallStack => HydraClient -> UTxO -> IO Tx
externalCommit :: HydraClient -> UTxO -> IO Tx
externalCommit client =
externalCommit' client . fmap (`TxOutWithWitness` Nothing)

Expand Down

0 comments on commit 39b3e5c

Please sign in to comment.