Skip to content

Commit

Permalink
Remove now unused waitForHeadIsInitializing
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Apr 21, 2023
1 parent b25aa5b commit ff3a384
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions hydra-node/test/Hydra/Model.hs
Original file line number Diff line number Diff line change
Expand Up @@ -676,27 +676,6 @@ checkOutcome _st (Commit _party expectedCommitted) actualCommitted =
expectedCommitted == actualCommitted
checkOutcome _ _ _ = True

waitForHeadIsInitializing ::
forall m tx.
MonadDelay m =>
Party ->
Map Party (TestHydraNode tx m) ->
m ()
waitForHeadIsInitializing party nodes = do
-- The reason why we repeatedly query the server is because we could
-- miss some outputs _before_ we even call that function which will
-- lead to random failures.
outs <- serverOutputs (nodes ! party)
case find matchHeadIsInitializing outs of
Nothing ->
threadDelay 10 >> waitForHeadIsInitializing party nodes
Just{} ->
pure ()
where
matchHeadIsInitializing = \case
HeadIsInitializing{} -> True
_ -> False

waitForUTxOToSpend ::
forall m.
(MonadDelay m, MonadTimer m) =>
Expand Down

0 comments on commit ff3a384

Please sign in to comment.