consensus-test
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Consensus.PeerSimulator.ChainSync

Synopsis

Documentation

runChainSyncClient Source #

Arguments

∷ (IOLike m, MonadTimer m, LedgerSupportsProtocol 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.

StrictTVar m (Map PeerId (ChainSyncClientHandle 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) → PeerIdStateViewTracers blk m → ChainSyncServer (Header blk) (Point blk) (Tip blk) m () → Channel m (AnyMessage (ChainSync (Header blk) (Point blk) (Tip blk))) → m () Source #