ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.ObjectPool.PerasCert

Description

Instantiate ObjectPoolReader and ObjectPoolWriter using Peras certificates from the PerasCertDB (or the ChainDB which is wrapping the PerasCertDB).

Synopsis

Documentation

makePerasCertPoolWriterFromCertDB ∷ ∀ blk (m ∷ TypeType). (StandardHash blk, IOLike m) ⇒ SystemTime m → PerasCertDB m blk → ObjectPoolWriter PerasRoundNo (PerasCert blk) m Source #

Create a pool writer directly from a PerasCertDB. This is mostly meant for tests against the PerasCertDB in isolation; for actual production use, see makePerasCertPoolWriterFromChainDB which creates a pool writer from the ChainDB with proper handling of chain selection side-effects.

makePerasCertPoolWriterFromChainDB ∷ ∀ blk (m ∷ TypeType). (StandardHash blk, IOLike m) ⇒ SystemTime m → ChainDB m blk → ObjectPoolWriter PerasRoundNo (PerasCert blk) m Source #

Create a pool writer from the ChainDB. This properly handles any needed chain selection side-effects.