Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- blockFetchServer ∷ ∀ m blk. (IOLike m, StandardHash blk, Typeable blk) ⇒ Tracer m (TraceBlockFetchServerEvent blk) → ChainDB m blk → NodeToNodeVersion → ResourceRegistry m → BlockFetchServer (Serialised blk) (Point blk) m ()
- data TraceBlockFetchServerEvent blk = TraceBlockFetchServerSendBlock !(Point blk)
- data BlockFetchServerException
- 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 ()
Documentation
blockFetchServer ∷ ∀ m blk. (IOLike m, StandardHash blk, Typeable blk) ⇒ Tracer m (TraceBlockFetchServerEvent blk) → ChainDB m blk → NodeToNodeVersion → ResourceRegistry 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.
TraceBlockFetchServerSendBlock !(Point blk) | The server sent a block to the peer. This traces the start, not the end, of block sending. |
Instances
StandardHash blk ⇒ Show (TraceBlockFetchServerEvent blk) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.BlockFetch.Server showsPrec ∷ Int → TraceBlockFetchServerEvent blk → ShowS # show ∷ TraceBlockFetchServerEvent blk → String # showList ∷ [TraceBlockFetchServerEvent blk] → ShowS # | |
StandardHash blk ⇒ Eq (TraceBlockFetchServerEvent blk) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.BlockFetch.Server (==) ∷ TraceBlockFetchServerEvent blk → TraceBlockFetchServerEvent blk → Bool # (/=) ∷ TraceBlockFetchServerEvent blk → TraceBlockFetchServerEvent blk → Bool # |
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 #