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

Test.Util.ChainDB

Synopsis

Documentation

data MinimalChainDbArgs m blk Source #

Minimal set of arguments for creating a ChainDB instance for testing purposes.

Constructors

MinimalChainDbArgs 

Fields

data NodeDBs db Source #

A vector with an element for each database of a node

The db type parameter is instantiated by this module at types for mock filesystems; either the MockFS type or reference cells thereof.

Constructors

NodeDBs 

Fields

Instances

Instances details
Foldable NodeDBs Source # 
Instance details

Defined in Test.Util.ChainDB

Methods

foldMonoid m ⇒ NodeDBs m → m #

foldMapMonoid m ⇒ (a → m) → NodeDBs a → m #

foldMap'Monoid m ⇒ (a → m) → NodeDBs a → m #

foldr ∷ (a → b → b) → b → NodeDBs a → b #

foldr' ∷ (a → b → b) → b → NodeDBs a → b #

foldl ∷ (b → a → b) → b → NodeDBs a → b #

foldl' ∷ (b → a → b) → b → NodeDBs a → b #

foldr1 ∷ (a → a → a) → NodeDBs a → a #

foldl1 ∷ (a → a → a) → NodeDBs a → a #

toListNodeDBs a → [a] #

nullNodeDBs a → Bool #

lengthNodeDBs a → Int #

elemEq a ⇒ a → NodeDBs a → Bool #

maximumOrd a ⇒ NodeDBs a → a #

minimumOrd a ⇒ NodeDBs a → a #

sumNum a ⇒ NodeDBs a → a #

productNum a ⇒ NodeDBs a → a #

Traversable NodeDBs Source # 
Instance details

Defined in Test.Util.ChainDB

Methods

traverseApplicative f ⇒ (a → f b) → NodeDBs a → f (NodeDBs b) #

sequenceAApplicative f ⇒ NodeDBs (f a) → f (NodeDBs a) #

mapMMonad m ⇒ (a → m b) → NodeDBs a → m (NodeDBs b) #

sequenceMonad m ⇒ NodeDBs (m a) → m (NodeDBs a) #

Functor NodeDBs Source # 
Instance details

Defined in Test.Util.ChainDB

Methods

fmap ∷ (a → b) → NodeDBs a → NodeDBs b #

(<$) ∷ a → NodeDBs b → NodeDBs a #

fromMinimalChainDbArgs ∷ (MonadThrow m, MonadSTM m, ConsensusProtocol (BlockProtocol blk), PrimMonad m) ⇒ MinimalChainDbArgs m blk → Complete ChainDbArgs m blk Source #

Creates a default set of of arguments for ChainDB tests.

mkTestChunkInfoTopLevelConfig TestBlockChunkInfo Source #

Utility function to get a default chunk info in case we have EraParams available.