Skip to content

Commit

Permalink
Make gossip failure results take non-zero time
Browse files Browse the repository at this point in the history
Add a TODO to add support for variable delays and synchronous failure.
  • Loading branch information
dcoutts committed May 4, 2021
1 parent c695bf4 commit 2f90a11
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -283,6 +283,7 @@ mockPeerSelectionActions' tracer
traceWith tracer (TraceEnvGossipTTL addr)
case mgossip of
Nothing -> do
threadDelay 1
traceWith tracer (TraceEnvGossipResult addr [])
fail "no peers"
Just (peeraddrs, time) -> do
Expand All @@ -292,6 +293,7 @@ mockPeerSelectionActions' tracer

establishPeerConnection :: PeerAddr -> m (PeerConn m)
establishPeerConnection peeraddr = do
--TODO: add support for variable delays and synchronous failure
threadDelay 1
(conn@(PeerConn _ v), snapshot) <- atomically $ do
conn <- newTVar PeerWarm
Expand Down

0 comments on commit 2f90a11

Please sign in to comment.