Safe Haskell | None |
---|---|
Language | Haskell2010 |
Test.Util.ChainDB
Synopsis
- data MinimalChainDbArgs m blk = MinimalChainDbArgs {}
- data NodeDBs db = NodeDBs {
- nodeDBsImm ∷ db
- nodeDBsVol ∷ db
- nodeDBsLgr ∷ db
- emptyNodeDBs ∷ MonadSTM m ⇒ m (NodeDBs (StrictTVar m MockFS))
- fromMinimalChainDbArgs ∷ (MonadThrow m, MonadSTM m, ConsensusProtocol (BlockProtocol blk)) ⇒ MinimalChainDbArgs m blk → ChainDbArgs Identity m blk
- mkTestChunkInfo ∷ LedgerConfig blk ~ EraParams ⇒ TopLevelConfig blk → ChunkInfo
Documentation
data MinimalChainDbArgs m blk Source #
Minimal set of arguments for creating a ChainDB instance for testing purposes.
Constructors
MinimalChainDbArgs | |
Fields
|
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
Functor NodeDBs Source # | |
Foldable NodeDBs Source # | |
Defined in Test.Util.ChainDB Methods fold ∷ Monoid m ⇒ NodeDBs m → m Source # foldMap ∷ Monoid m ⇒ (a → m) → NodeDBs a → m Source # foldMap' ∷ Monoid m ⇒ (a → m) → NodeDBs a → m Source # foldr ∷ (a → b → b) → b → NodeDBs a → b Source # foldr' ∷ (a → b → b) → b → NodeDBs a → b Source # foldl ∷ (b → a → b) → b → NodeDBs a → b Source # foldl' ∷ (b → a → b) → b → NodeDBs a → b Source # foldr1 ∷ (a → a → a) → NodeDBs a → a Source # foldl1 ∷ (a → a → a) → NodeDBs a → a Source # toList ∷ NodeDBs a → [a] Source # null ∷ NodeDBs a → Bool Source # length ∷ NodeDBs a → Int Source # elem ∷ Eq a ⇒ a → NodeDBs a → Bool Source # maximum ∷ Ord a ⇒ NodeDBs a → a Source # minimum ∷ Ord a ⇒ NodeDBs a → a Source # | |
Traversable NodeDBs Source # | |
emptyNodeDBs ∷ MonadSTM m ⇒ m (NodeDBs (StrictTVar m MockFS)) Source #
fromMinimalChainDbArgs ∷ (MonadThrow m, MonadSTM m, ConsensusProtocol (BlockProtocol blk)) ⇒ MinimalChainDbArgs m blk → ChainDbArgs Identity m blk Source #
Creates a default set of of arguments for ChainDB tests.
mkTestChunkInfo ∷ LedgerConfig blk ~ EraParams ⇒ TopLevelConfig blk → ChunkInfo Source #
Utility function to get a default chunk info in case we have EraParams available.