Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BlockFetch blk
- = StartBatch [blk]
- | NoBlocks
- data BlockFetchServerHandlers m state blk = BlockFetchServerHandlers {
- bfshBlockFetch ∷ ChainRange (Point blk) → state → STM m (Maybe (BlockFetch blk), [TraceScheduledBlockFetchServerEvent state blk])
- bfshSendBlocks ∷ [blk] → state → STM m (Maybe (SendBlocks blk), [TraceScheduledBlockFetchServerEvent state blk])
- data ScheduledBlockFetchServer m state blk = ScheduledBlockFetchServer {
- sbfsServer ∷ ScheduledServer m state blk
- sbfsTracer ∷ Tracer m (TraceScheduledBlockFetchServerEvent state blk)
- sbfsHandlers ∷ BlockFetchServerHandlers m state blk
- data SendBlocks blk
- runScheduledBlockFetchServer ∷ IOLike m ⇒ PeerId → STM m () → STM m (Maybe (NodeState blk)) → Tracer m (TraceEvent blk) → BlockFetchServerHandlers m (NodeState blk) blk → BlockFetchServer blk (Point blk) m ()
Documentation
data BlockFetch blk Source #
Return values for the handlerBlockFetch
.
StartBatch [blk] | As a response to the client request, we should send the blocks in the given batch. |
NoBlocks | Negative response to the client's request for blocks. |
Instances
Show blk ⇒ Show (BlockFetch blk) Source # | |
Defined in Test.Consensus.PeerSimulator.ScheduledBlockFetchServer showsPrec ∷ Int → BlockFetch blk → ShowS # show ∷ BlockFetch blk → String # showList ∷ [BlockFetch blk] → ShowS # | |
Eq blk ⇒ Eq (BlockFetch blk) Source # | |
Defined in Test.Consensus.PeerSimulator.ScheduledBlockFetchServer (==) ∷ BlockFetch blk → BlockFetch blk → Bool # (/=) ∷ BlockFetch blk → BlockFetch blk → Bool # |
data BlockFetchServerHandlers m state blk Source #
Handlers for the scheduled BlockFetch server.
BlockFetchServerHandlers | |
|
data ScheduledBlockFetchServer m state blk Source #
Resources used by a scheduled BlockFetch server. This comprises a generic
ScheduledServer
and BlockFetch-specific handlers.
ScheduledBlockFetchServer | |
|
runScheduledBlockFetchServer ∷ IOLike m ⇒ PeerId → STM m () → STM m (Maybe (NodeState blk)) → Tracer m (TraceEvent blk) → BlockFetchServerHandlers m (NodeState blk) blk → BlockFetchServer blk (Point blk) m () Source #
Construct a BlockFetch server for the peer simulator.
See scheduledBlockFetchServer
.