consensus-test
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Consensus.PeerSimulator.ScheduledBlockFetchServer

Synopsis

Documentation

data BlockFetch blk Source #

Return values for the handlerBlockFetch.

Constructors

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

Instances details
Show blk ⇒ Show (BlockFetch blk) Source # 
Instance details

Defined in Test.Consensus.PeerSimulator.ScheduledBlockFetchServer

Methods

showsPrecIntBlockFetch blk → ShowS #

showBlockFetch blk → String #

showList ∷ [BlockFetch blk] → ShowS #

Eq blk ⇒ Eq (BlockFetch blk) Source # 
Instance details

Defined in Test.Consensus.PeerSimulator.ScheduledBlockFetchServer

Methods

(==)BlockFetch blk → BlockFetch blk → Bool #

(/=)BlockFetch blk → BlockFetch blk → Bool #

data BlockFetchServerHandlers m state blk Source #

Handlers for the scheduled BlockFetch server.

Constructors

BlockFetchServerHandlers 

Fields

data ScheduledBlockFetchServer m state blk Source #

Resources used by a scheduled BlockFetch server. This comprises a generic ScheduledServer and BlockFetch-specific handlers.

data SendBlocks blk Source #

Return values for the handlerSendBlocks.

Constructors

SendBlock blk [blk] 
BatchDone 

runScheduledBlockFetchServerIOLike m ⇒ PeerIdSTM 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.