ouroboros-consensus-0.18.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Storage.VolatileDB.Impl.Index

Contents

Description

VolatileDB Index

Intended for qualified import > import qualified Ouroboros.Consensus.Storage.VolatileDB.Impl.Index as Index

Synopsis

Documentation

deleteFileIdIndex blk → Index blk Source #

elemsIndex blk → [FileInfo blk] Source #

insertFileIdFileInfo blk → Index blk → Index blk Source #

lastFileIndex blk → Maybe (FileId, FileInfo blk) Source #

Return the last, i.e. the highest, FileId and corresponding FileInfo stored in the Index. Return Nothing when empty.

lookupFileIdIndex blk → Maybe (FileInfo blk) Source #

toAscListIndex blk → [(FileId, FileInfo blk)] Source #

opaque

data Index blk Source #

Mapping from FileId to FileInfo

Instances

Instances details
Generic (Index blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.Index

Associated Types

type Rep (Index blk) ∷ TypeType #

Methods

fromIndex blk → Rep (Index blk) x #

toRep (Index blk) x → Index blk #

StandardHash blk ⇒ NoThunks (Index blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.Index

type Rep (Index blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.Index

type Rep (Index blk) = D1 ('MetaData "Index" "Ouroboros.Consensus.Storage.VolatileDB.Impl.Index" "ouroboros-consensus-0.18.0.0-inplace" 'True) (C1 ('MetaCons "Index" 'PrefixI 'True) (S1 ('MetaSel ('Just "unIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IntMap (FileInfo blk)))))