| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Storage.ChainDB.Impl.Reader
Description
Readers
Synopsis
- newReader :: forall m blk b. (IOLike m, HasHeader blk, GetHeader blk, HasNestedContent Header blk, EncodeDiskDep (NestedCtxt Header) blk) => ChainDbHandle m blk -> ResourceRegistry m -> BlockComponent blk b -> m (Reader m blk b)
- switchFork :: forall m blk b. (HasHeader blk, HasHeader (Header blk)) => Point blk -> AnchoredFragment (Header blk) -> ReaderState m blk b -> ReaderState m blk b
- closeAllReaders :: IOLike m => ChainDbEnv m blk -> m ()
Documentation
newReader :: forall m blk b. (IOLike m, HasHeader blk, GetHeader blk, HasNestedContent Header blk, EncodeDiskDep (NestedCtxt Header) blk) => ChainDbHandle m blk -> ResourceRegistry m -> BlockComponent blk b -> m (Reader m blk b) Source #
Arguments
| :: forall m blk b. (HasHeader blk, HasHeader (Header blk)) | |
| => Point blk | Intersection point between old and new chain |
| -> AnchoredFragment (Header blk) | The new chain |
| -> ReaderState m blk b | |
| -> ReaderState m blk b |
Update the given ReaderState to account for switching the current
chain to the given fork (which might just be an extension of the
current chain).
PRECONDITION: the intersection point must be within the fragment bounds of the new chain
closeAllReaders :: IOLike m => ChainDbEnv m blk -> m () Source #
Close all open block and header Readers.