ouroboros-network-0.1.0.0: A networking layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.Protocol.BlockFetch.Server

Synopsis

Documentation

data BlockFetchServer block point m a where Source #

Constructors

BlockFetchServer ∷ (ChainRange point → m (BlockFetchBlockSender block point m a)) → a → BlockFetchServer block point m a 

data BlockFetchBlockSender block point m a where Source #

Send batches of blocks, when a batch is sent loop using BlockFetchServer.

Constructors

SendMsgStartBatch ∷ m (BlockFetchSendBlocks block point m a) → BlockFetchBlockSender block point m a

Initiate a batch of blocks.

SendMsgNoBlocks ∷ m (BlockFetchServer block point m a) → BlockFetchBlockSender block point m a 

data BlockFetchSendBlocks block point m a where Source #

Stream batch of blocks

Constructors

SendMsgBlock ∷ block → m (BlockFetchSendBlocks block point m a) → BlockFetchSendBlocks block point m a

Send a single block and recurse.

SendMsgBatchDone ∷ m (BlockFetchServer block point m a) → BlockFetchSendBlocks block point m a

End of the stream of block bodies.

blockFetchServerPeer ∷ ∀ block point m a. Functor m ⇒ BlockFetchServer block point m a → Peer (BlockFetch block point) AsServer BFIdle m a Source #