| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.MempoolTx
Description
Transactions as they are received by the mempool. See MempoolTx for details.
Synopsis
- data MempoolTx era
- unwrapMempoolTx ∷ MempoolTx era → Tx 'TopTx era
- binaryUpgradeMempoolTx ∷ (Era era, Era (PreviousEra era), EncCBOR (MempoolTx (PreviousEra era)), DecCBOR (Annotator (MempoolTx era))) ⇒ MempoolTx (PreviousEra era) → Except DecoderError (MempoolTx era)
Documentation
A top-level transaction as it is received by the mempool.
A transaction in the mempool and a transaction in a block do not have the same serialization and they have different concerns, therefore they are not interchangeable. New submissions are obtained by decoding their mempool serialization. The constructor is kept internal to prevent accidental wrapping of a transaction taken from a block.
Warning - The UnsafeMkMempoolTx constructor is for codecs, trusted ledger operations,
and testing. It must not be used to turn an arbitrary block transaction into a mempool
transaction.
unwrapMempoolTx ∷ MempoolTx era → Tx 'TopTx era Source #
Get the transaction that was received by the mempool.
binaryUpgradeMempoolTx ∷ (Era era, Era (PreviousEra era), EncCBOR (MempoolTx (PreviousEra era)), DecCBOR (Annotator (MempoolTx era))) ⇒ MempoolTx (PreviousEra era) → Except DecoderError (MempoolTx era) Source #
Translate a mempool transaction through its binary representation from the previous era to the current one. Block transactions are not upgraded.