ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Storage.VolatileDB.Impl.FileInfo

Description

Information about the files stored by the volatile DB

Intended for qualified import.

Synopsis

opaque

data FileInfo blk Source #

The internal information the VolatileDB keeps for each file.

Instances

Instances details
StandardHash blk ⇒ Show (FileInfo blk) Source # 
Instance details

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

Methods

showsPrecIntFileInfo blk → ShowS Source #

showFileInfo blk → String Source #

showList ∷ [FileInfo blk] → ShowS Source #

Generic (FileInfo blk) Source # 
Instance details

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

Associated Types

type Rep (FileInfo blk) ∷ TypeType Source #

Methods

fromFileInfo blk → Rep (FileInfo blk) x Source #

toRep (FileInfo blk) x → FileInfo blk Source #

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

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

Methods

noThunks ∷ Context → FileInfo blk → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → FileInfo blk → IO (Maybe ThunkInfo) #

showTypeOfProxy (FileInfo blk) → String #

type Rep (FileInfo blk) Source # 
Instance details

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

type Rep (FileInfo blk) = D1 ('MetaData "FileInfo" "Ouroboros.Consensus.Storage.VolatileDB.Impl.FileInfo" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "FileInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MaxSlotNo) :*: S1 ('MetaSel ('Just "hashes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (HeaderHash blk)))))

Construction

addBlockStandardHash blk ⇒ SlotNoHeaderHash blk → FileInfo blk → FileInfo blk Source #

Adds a block to a FileInfo.

fromParsedBlockInfos ∷ ∀ blk. StandardHash blk ⇒ [ParsedBlockInfo blk] → FileInfo blk Source #

Construct a FileInfo from the parser result.

Queries

canGC Source #

Arguments

FileInfo blk 
SlotNo

The slot which we want to GC

Bool 

Checks if this file can be GCed.

hashesFileInfo blk → Set (HeaderHash blk) Source #

isFullBlocksPerFileFileInfo blk → Bool Source #

Has this file reached its maximum size?