Skip to content

Commit

Permalink
Add a few misc comments and TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoutts committed May 4, 2021
1 parent 09c84fb commit b3b66a1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Expand Up @@ -88,11 +88,13 @@ jobs jobPool st =
--
reconnectDelay :: DiffTime
reconnectDelay = 10
--TODO: make this a policy param

-- | Activation delay after a peer was asynchronously demoted to warm state.
--
activateDelay :: DiffTime
activateDelay = 60
--TODO: make this a policy param


-- | Monitor connections.
Expand Down
Expand Up @@ -500,7 +500,7 @@ data TracePeerSelection peeraddr =
deriving Show

data DebugPeerSelection peeraddr peerconn =
TraceGovernorState Time
(Maybe DiffTime)
TraceGovernorState Time -- blocked time
(Maybe DiffTime) -- wait time
(PeerSelectionState peeraddr peerconn)
deriving (Show, Functor)
Expand Up @@ -352,7 +352,7 @@ minConnectTime KnownPeers { nextConnectTimes }


setConnectTime :: Ord peeraddr
=> Set peeraddr
=> Set peeraddr --TODO: make this a single entry
-> Time
-> KnownPeers peeraddr
-> KnownPeers peeraddr
Expand Down
Expand Up @@ -1591,6 +1591,12 @@ selectEnvTargets f =
-- Live examples
--

-- | Run the 'publicRootPeersProvider' in IO with a stdout tracer to observe
-- what it does.
--
-- This is a manual test that runs in IO and has to be observed to see that it
-- is doing something sensible. It is not run automatically.
--
_governorFindingPublicRoots :: Int -> [DomainAddress] -> IO Void
_governorFindingPublicRoots targetNumberOfRootPeers domains =
withTimeoutSerial $ \timeout ->
Expand Down

0 comments on commit b3b66a1

Please sign in to comment.