cardano-sl-0.4.3: Cardano SL main implementation

Safe HaskellNone
LanguageHaskell2010

Pos.DB.DB

Contents

Description

Higher-level DB functionality.

Synopsis

Documentation

openNodeDBs :: MonadIO m => Bool -> FilePath -> m NodeDBs Source #

Open all DBs stored on disk.

initNodeDBs :: forall ssc m. (SscHelpersClass ssc, WithNodeContext ssc m, MonadDB m) => m () Source #

Initialize DBs if necessary.

getTip :: MonadDB m => m HeaderHash #

Get current tip from GState DB.

getTipBlock :: (SscHelpersClass ssc, MonadDB m) => m (Block ssc) Source #

Get block corresponding to tip.

getTipBlockHeader :: (SscHelpersClass ssc, MonadDB m) => m (BlockHeader ssc) Source #

Get BlockHeader corresponding to tip.

loadBlundsFromTipWhile :: (SscHelpersClass ssc, MonadDB m) => (Block ssc -> Bool) -> m (NewestFirst [] (Blund ssc)) Source #

Load blunds from BlockDB starting from tip and while the condition is true.

loadBlundsFromTipByDepth :: (SscHelpersClass ssc, MonadDB m) => Word -> m (NewestFirst [] (Blund ssc)) Source #

Load blunds from BlockDB starting from tip which have depth less than given.

Orphan instances