ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.PeerSimulator.ChainSync

Synopsis

Documentation

chainSyncNoSizeLimits ∷ ProtocolSizeLimits (ChainSync header point tip) bytes Source #

runChainSyncClient Source #

Arguments

∷ (IOLike m, MonadTimer m, LedgerSupportsProtocol blk, BlockSupportsPeras blk, ShowProxy blk, ShowProxy (Header blk)) 
⇒ Tracer m (TraceEvent blk) 
→ TopLevelConfig blk 
→ ChainDbView m blk 
→ PeerId

The id of the peer to which the client connects.

→ ChainSyncTimeout

Timeouts for this client.

→ ChainSyncLoPBucketConfig

Configuration for the LoP bucket.

→ CSJConfig

Configuration for ChainSync Jumping

→ StateViewTracers blk m

Tracers used to record information for the future StateView.

→ ChainSyncClientHandleCollection PeerId m blk

A TVar containing a map of states for each peer. This function will (via bracketChainSyncClient) register and de-register a TVar for the state of the peer.

→ Channel m (AnyMessage (ChainSync (Header blk) (Point blk) (Tip blk))) 
→ m () 

Create and run a ChainSync client using bracketChainSyncClient and basicChainSyncClient, synchronously. Exceptions are caught, sent to the StateViewTracers and logged.

runChainSyncServer ∷ (IOLike m, ShowProxy blk, ShowProxy (Header blk)) ⇒ Tracer m (TraceEvent blk) → PeerId → StateViewTracers blk m → ChainSyncServer (Header blk) (Point blk) (Tip blk) m () → Channel m (AnyMessage (ChainSync (Header blk) (Point blk) (Tip blk))) → m () Source #