Skip to content

Commit

Permalink
p2p-governor: Adjust playTimedScript to trace the initial value
Browse files Browse the repository at this point in the history
This is just for completeness and makes the traces easier to interpret.
  • Loading branch information
dcoutts authored and coot committed Sep 27, 2021
1 parent d098d90 commit fb30b94
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -112,6 +112,7 @@ playTimedScript :: (MonadAsync m, MonadTimer m)
=> Tracer m a -> TimedScript a -> m (TVar m a)
playTimedScript tracer (Script ((x0,d0) :| script)) = do
v <- newTVarIO x0
traceWith tracer x0
_ <- async $ do
threadDelay (interpretScriptDelay d0)
sequence_ [ do atomically (writeTVar v x)
Expand Down

0 comments on commit fb30b94

Please sign in to comment.