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

Ouroboros.Network.PeerSelection.Governor.ActivePeers

Synopsis

Documentation

belowTarget ∷ ∀ peeraddr peerconn m. (MonadDelay m, MonadSTM m, Ord peeraddr) ⇒ PeerSelectionActions peeraddr peerconn m → MkGuardedDecision peeraddr peerconn m Source #

If we are below the target of hot peers we promote some of the /warm peers/ according to policyPickWarmPeersToPromote policy.

aboveTarget ∷ ∀ peeraddr peerconn m. (MonadSTM m, Ord peeraddr) ⇒ PeerSelectionActions peeraddr peerconn m → MkGuardedDecision peeraddr peerconn m Source #

If we are above the target of hot peers we demote some hot peers to be warm peers, according to policyPickHotPeersToDemote.

jobDemoteActivePeer ∷ ∀ peeraddr peerconn m. (Monad m, Ord peeraddr) ⇒ PeerSelectionActions peeraddr peerconn m → peeraddr → peerconn → Job () m (Completion m peeraddr peerconn) Source #