Skip to content

Commit

Permalink
We do not need to wait for a day here
Browse files Browse the repository at this point in the history
Waiting for a day, at a pace of one block every 20 seconds would
generate 4320 blocks which takes forever to be created and
processes, even in IO sim.

We don't really observe the issue now because we cheat in the
way we generate the block.

This commit helps preparing for a more realistic block generation.
  • Loading branch information
pgrange committed Mar 24, 2023
1 parent 270b957 commit f772fc5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions hydra-node/test/Hydra/ModelSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,11 @@ prop_checkModel actions =
-- now a "more active" simulated chain which ticks away and not simply
-- detects a deadlock if we wait for infinity. Maybe cancelling the
-- simulation's 'tickThread' and wait then could work?
run $ lift waitForADay
let parties = Set.fromList $ deriveParty . fst <$> hydraParties
nodes <- run $ gets nodes
assert (parties == Map.keysSet nodes)
forM_ parties $ \p -> do
assertBalancesInOpenHeadAreConsistent hydraState nodes p
where
waitForADay :: MonadDelay m => m ()
waitForADay = threadDelay $ 60 * 60 * 24

assertBalancesInOpenHeadAreConsistent ::
GlobalState ->
Expand Down

0 comments on commit f772fc5

Please sign in to comment.