ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
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
Generic (FileInfo blk) Source # 
Instance details

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

Associated Types

type Rep (FileInfo blk) ∷ TypeType #

Methods

fromFileInfo blk → Rep (FileInfo blk) x #

toRep (FileInfo blk) x → FileInfo blk #

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

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

Methods

showsPrecIntFileInfo blk → ShowS #

showFileInfo blk → String #

showList ∷ [FileInfo blk] → ShowS #

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

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

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.21.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?