Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Mempool.Capacity
Contents
Description
Mempool capacity, size and transaction size datatypes.
This module also defines how to manually override the mempool capacity.
import Ouroboros.Consensus.Mempool.Capacity (Capacity) import qualified Ouroboros.Consensus.Mempool.Capacity as Capacity
Synopsis
Mempool capacity
data MempoolCapacityBytesOverride Source #
An override for the default MempoolCapacityBytes
which is 2x the
maximum transaction capacity
Constructors
NoMempoolCapacityBytesOverride | Use 2x the maximum transaction capacity of a block. This will change dynamically with the protocol parameters adopted in the current ledger. |
MempoolCapacityBytesOverride !ByteSize32 | Use the least multiple of the block capacity that is no less than this size. |
Instances
computeMempoolCapacity ∷ LedgerSupportsMempool blk ⇒ LedgerConfig blk → TickedLedgerState blk → MempoolCapacityBytesOverride → TxMeasure blk Source #
If no override is provided, calculate the default mempool capacity as 2x the current ledger's maximum transaction capacity of a block.
If an override is present, reinterpret it as a number of blocks (rounded up), and then simply multiply the ledger's capacity by that number.
mkCapacityBytesOverride ∷ ByteSize32 → MempoolCapacityBytesOverride Source #
Create an override for the mempool capacity using the provided number of bytes.
Mempool Size
data MempoolSize Source #
The size of a mempool.
Constructors
MempoolSize | |
Fields
|
Instances
Monoid MempoolSize Source # | |
Defined in Ouroboros.Consensus.Mempool.Capacity | |
Semigroup MempoolSize Source # | |
Defined in Ouroboros.Consensus.Mempool.Capacity Methods (<>) ∷ MempoolSize → MempoolSize → MempoolSize # sconcat ∷ NonEmpty MempoolSize → MempoolSize # stimes ∷ Integral b ⇒ b → MempoolSize → MempoolSize # | |
Show MempoolSize Source # | |
Defined in Ouroboros.Consensus.Mempool.Capacity Methods showsPrec ∷ Int → MempoolSize → ShowS # show ∷ MempoolSize → String # showList ∷ [MempoolSize] → ShowS # | |
Eq MempoolSize Source # | |
Defined in Ouroboros.Consensus.Mempool.Capacity |