Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Network.Protocol.BlockFetch.Codec
Synopsis
- codecBlockFetch :: forall block point (m :: Type -> Type). MonadST m => (block -> Encoding) -> (forall s. Decoder s block) -> (point -> Encoding) -> (forall s. Decoder s point) -> Codec (BlockFetch block point) DeserialiseFailure m ByteString
- codecBlockFetchId :: forall block point (m :: Type -> Type). Monad m => Codec (BlockFetch block point) CodecFailure m (AnyMessage (BlockFetch block point))
- byteLimitsBlockFetch :: (bytes -> Word) -> ProtocolSizeLimits (BlockFetch block point) bytes
- timeLimitsBlockFetch :: ProtocolTimeLimits (BlockFetch block point)
Documentation
Arguments
:: forall block point (m :: Type -> Type). MonadST m | |
=> (block -> Encoding) | encode block |
-> (forall s. Decoder s block) | decode block |
-> (point -> Encoding) | encode point |
-> (forall s. Decoder s point) | decode point |
-> Codec (BlockFetch block point) DeserialiseFailure m ByteString |
Codec for chain sync that encodes/decodes blocks and points.
NOTE: See wrapCBORinCBOR
and unwrapCBORinCBOR
if you want to use this
with a block type that has annotations.
codecBlockFetchId :: forall block point (m :: Type -> Type). Monad m => Codec (BlockFetch block point) CodecFailure m (AnyMessage (BlockFetch block point)) Source #
Arguments
:: (bytes -> Word) | compute size of bytes |
-> ProtocolSizeLimits (BlockFetch block point) bytes |
Byte Limit.
timeLimitsBlockFetch :: ProtocolTimeLimits (BlockFetch block point) Source #
Time Limits
BlockFetch state | timeout (s) |
---|---|
BFIdle | waitForever |
BFBusy | longWait |
BFStreaming | longWait |