ouroboros-network-0.16.1.0: A networking layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.PeerSelection.Governor.ActivePeers

Synopsis

Documentation

belowTarget ∷ ∀ peeraddr peerconn m. (Alternative (STM m), MonadDelay m, MonadSTM m, Ord peeraddr, HasCallStack) ⇒ 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. (Alternative (STM m), MonadSTM m, Ord peeraddr, HasCallStack) ⇒ 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 #