ouroboros-network-0.1.0.0: A networking layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.PeerSelection.Governor.KnownPeers

Synopsis

Documentation

belowTarget ∷ (MonadAsync m, MonadTimer m, Ord peeraddr) ⇒ PeerSelectionActions peeraddr peerconn m → MkGuardedDecision peeraddr peerconn m Source #

If we are below the target of known peers we gossip (if we are above the gossip request threashold).

aboveTarget ∷ (MonadSTM m, Ord peeraddr) ⇒ MkGuardedDecision peeraddr peerconn m Source #

If we are above the target of known peers (i.e. cold, warm and hot combined), we drop some of the cold peers but we protect the targetNumberOfRootPeers (from combined sets of local and public root peers). policyPickColdPeersToForget policy is used to pick the peers.