ouroboros-network-0.1.0.1: A networking layer for the Ouroboros blockchain protocol
Safe Haskell Safe-Inferred
Language Haskell2010

Ouroboros.Network.PeerSelection.EstablishedPeers

Synopsis

Documentation

toMap :: EstablishedPeers peeraddr peerconn -> Map peeraddr peerconn Source #

O(1)

toSet :: EstablishedPeers peeraddr peerconn -> Set peeraddr Source #

O(n)

readyPeers :: Ord peeraddr => EstablishedPeers peeraddr peerconn -> Set peeraddr Source #

Map of established peers that are either active or ready to be promoted to active.

O(n log m), for n not-ready peers, and m established peers

size :: EstablishedPeers peeraddr peerconn -> Int Source #

The number of established peers. The size of allPeers

O(1)

sizeReady :: EstablishedPeers peeraddr peerconn -> Int Source #

The number of ready peers. The size of readyPeers

O(1)

member :: Ord peeraddr => peeraddr -> EstablishedPeers peeraddr peerconn -> Bool Source #

insert :: Ord peeraddr => peeraddr -> peerconn -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #

Insert a peer into EstablishedPeers .

delete :: Ord peeraddr => peeraddr -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #

deletePeers :: Ord peeraddr => Set peeraddr -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #

Bulk delete of peers from 'EstablishedPeers.

setCurrentTime :: Ord peeraddr => Time -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #

setActivateTime :: Ord peeraddr => Set peeraddr -> Time -> EstablishedPeers peeraddr peerconn -> EstablishedPeers peeraddr peerconn Source #