ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.PeerSimulator.BlockFetch

Description

Functions that call to the BlockFetch API to start clients and servers

Documentation

runBlockFetchClient Source #

Arguments

∷ (IOLike m, MonadTime m, MonadTimer m, HasHeader blk, HasHeader (Header blk), ShowProxy blk) 
⇒ Tracer m (TraceEvent blk) 
→ PeerId 
→ BlockFetchTimeout 
→ StateViewTracers blk m 
→ FetchClientRegistry PeerId (HeaderWithTime blk) blk m 
→ KeepAliveRegistry PeerId m 
→ ControlMessageSTM m 
→ Channel m (AnyMessage (BlockFetch blk (Point blk)))

Send and receive message via the given Channel.

→ m () 

runBlockFetchServer Source #

Arguments

∷ (IOLike m, ShowProxy blk) 
⇒ Tracer m (TraceEvent blk) 
→ PeerId 
→ StateViewTracers blk m 
→ BlockFetchServer blk (Point blk) m () 
→ Channel m (AnyMessage (BlockFetch blk (Point blk)))

Send and receive message via the given Channel.

→ m () 

startBlockFetchLogic Source #

Arguments

∷ (IOLike m, MonadTimer m, LedgerSupportsProtocol blk, BlockSupportsDiffusionPipelining blk, ConfigSupportsNode blk) 
⇒ Bool

Whether to enable chain selection starvation

→ ResourceRegistry m 
→ Tracer m (TraceEvent blk) 
→ ProtocolInfo blk 
→ ChainDB m blk 
→ FetchClientRegistry PeerId (HeaderWithTime blk) blk m 
→ KeepAliveRegistry PeerId m 
→ ChainSyncClientHandleCollection PeerId m blk 
→ m () 

startKeepAliveThread ∷ ∀ m peer. (Ord peer, IOLike m) ⇒ ResourceRegistry m → KeepAliveRegistry peer m → peer → m () Source #