ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.MiniProtocol.BlockFetch.Server

Synopsis

Documentation

blockFetchServer ∷ ∀ m blk. (IOLike m, StandardHash blk, Typeable blk) ⇒ Tracer m (TraceBlockFetchServerEvent blk) → ChainDB m blk → NodeToNodeVersionResourceRegistry m → BlockFetchServer (Serialised blk) (Point blk) m () Source #

Block fetch server based on mockBlockFetchServer1, but using the ChainDB.

Trace events

data TraceBlockFetchServerEvent blk Source #

Events traced by the Block Fetch Server.

Constructors

TraceBlockFetchServerSendBlock !(Point blk)

The server sent a block to the peer. This traces the start, not the end, of block sending.

Exceptions

Low-level API

blockFetchServer' ∷ ∀ m blk a. (IOLike m, StandardHash blk, Typeable blk) ⇒ Tracer m (TraceBlockFetchServerEvent blk) → (StreamFrom blk → StreamTo blk → m (Either (UnknownRange blk) (Iterator m blk (WithPoint blk a)))) → BlockFetchServer a (Point blk) m () Source #