Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
LightSyncSource
m block addr txs =
LightSyncSource
{
- getHeader :: block -> BlockHeader
- getTip :: m BlockHeader
- getBlockHeaderAtHeight :: BlockHeight -> m ( Consensual BlockHeader )
- getNextBlockHeader :: BlockHeader -> m ( Consensual ( Maybe BlockHeader ))
- getBlockHeaderAt :: ChainPoint -> m ( Consensual BlockHeader )
- getNextBlocks :: ChainPoint -> m ( Consensual [block])
- getAddressTxs :: BlockHeader -> BlockHeader -> addr -> m txs
- type LightBlocks m block addr txs = Either ( NonEmpty block) ( BlockSummary m addr txs)
- hoistLightSyncSource :: ( forall a. m a -> n a) -> LightSyncSource m block addr txs -> LightSyncSource n block addr txs
- lightSync :: MonadDelay m => Tracer m LightLayerLog -> LightSyncSource m block addr txs -> ChainFollower m ChainPoint BlockHeader ( LightBlocks m block addr txs) -> m Void
-
data
Consensual
a
- = NotConsensual
- | Consensual a
- data LightLayerLog
Interface
data LightSyncSource m block addr txs Source #
Blockchain data source suitable for the implementation of
lightSync
.
LightSyncSource | |
|
type LightBlocks m block addr txs = Either ( NonEmpty block) ( BlockSummary m addr txs) Source #
hoistLightSyncSource :: ( forall a. m a -> n a) -> LightSyncSource m block addr txs -> LightSyncSource n block addr txs Source #
lightSync :: MonadDelay m => Tracer m LightLayerLog -> LightSyncSource m block addr txs -> ChainFollower m ChainPoint BlockHeader ( LightBlocks m block addr txs) -> m Void Source #
Drive a
ChainFollower
using a
LightSyncSource
.
Never returns.
data Consensual a Source #
Consensual
represents the result of query on the blockchain.
Either the result is a value that is part of the consensus chain,
or the result is an indication that the consensus had changed
before the entire value could be retrieved.
Instances
data LightLayerLog Source #
MsgLightRollForward ChainPoint BlockHeader BlockHeader BlockHeader | |
MsgLightRolledForward BlockHeader | |
MsgLightRollBackward ChainPoint ChainPoint |