Skip to content

Commit

Permalink
Fix dropping logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo authored and ffakenz committed May 23, 2024
1 parent 7b29939 commit 1908f09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hydra-node/test/Hydra/Network/ReliabilitySpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,9 @@ prop_stressTest nAlice nBob nCarol seed =
forM_ (Map.toList peers) $ \(p, send) -> do
-- drop 2% of messages
r <- randomNumber stdGenV
unless (p == party && r < 0.02) $
send (Authenticated msg party) -- calls receiveMessage on the other end
if (p == party || r < 0.02)
then pure () -- drop
else send (Authenticated msg party) -- calls receiveMessage on the other end
, onMessageReceived
}

Expand Down

0 comments on commit 1908f09

Please sign in to comment.