ouroboros-network
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.PeerSelection.PublicRootPeers

Synopsis

Types

data PublicRootPeers peeraddr Source #

Public Root Peers consist of either a set of manually configured bootstrap peers.

There's an implicit precedence that will priorise bootstrap peers over the other sets, so if we are adding a bootstrap peer and that peer is already a member of other public root set, it is going to be removed from that set and added to the bootstrap peer set.

Constructors

PublicRootPeers 

Fields

Instances

Instances details
Ord peeraddr => Monoid (PublicRootPeers peeraddr) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.PublicRootPeers

Methods

mempty :: PublicRootPeers peeraddr #

mappend :: PublicRootPeers peeraddr -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr #

mconcat :: [PublicRootPeers peeraddr] -> PublicRootPeers peeraddr #

Ord peeraddr => Semigroup (PublicRootPeers peeraddr) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.PublicRootPeers

Methods

(<>) :: PublicRootPeers peeraddr -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr #

sconcat :: NonEmpty (PublicRootPeers peeraddr) -> PublicRootPeers peeraddr #

stimes :: Integral b => b -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr #

Show peeraddr => Show (PublicRootPeers peeraddr) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.PublicRootPeers

Methods

showsPrec :: Int -> PublicRootPeers peeraddr -> ShowS #

show :: PublicRootPeers peeraddr -> String #

showList :: [PublicRootPeers peeraddr] -> ShowS #

Eq peeraddr => Eq (PublicRootPeers peeraddr) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.PublicRootPeers

Methods

(==) :: PublicRootPeers peeraddr -> PublicRootPeers peeraddr -> Bool #

(/=) :: PublicRootPeers peeraddr -> PublicRootPeers peeraddr -> Bool #

invariant :: Ord peeraddr => PublicRootPeers peeraddr -> Bool Source #

Basic operations

member :: Ord peeraddr => peeraddr -> PublicRootPeers peeraddr -> Bool Source #

merge :: Ord peeraddr => PublicRootPeers peeraddr -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr Source #

difference :: Ord peeraddr => PublicRootPeers peeraddr -> Set peeraddr -> PublicRootPeers peeraddr Source #

intersection :: Ord peeraddr => PublicRootPeers peeraddr -> Set peeraddr -> PublicRootPeers peeraddr Source #

toSet :: Ord peeraddr => PublicRootPeers peeraddr -> Set peeraddr Source #

toAllLedgerPeerSet :: Ord peeraddr => PublicRootPeers peeraddr -> Set peeraddr Source #

insertPublicConfigPeer :: Ord peeraddr => peeraddr -> PeerAdvertise -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr Source #

insertBootstrapPeer :: Ord peeraddr => peeraddr -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr Source #

insertLedgerPeer :: Ord peeraddr => peeraddr -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr Source #

insertBigLedgerPeer :: Ord peeraddr => peeraddr -> PublicRootPeers peeraddr -> PublicRootPeers peeraddr Source #

fromLedgerPeers :: Set peeraddr -> PublicRootPeers peeraddr Source #

fromMapAndSet Source #

Arguments

:: Ord peeraddr 
=> Map peeraddr PeerAdvertise

public configured root peers

-> Set peeraddr

bootstrap peers

-> Set peeraddr

ledger peers

-> Set peeraddr

big ledger peers

-> PublicRootPeers peeraddr 

Preserves PublicRootPeers invariant. If the two sets are not disjoint, removes the common ones from the bootstrap peers set since its the most sensitive set.