Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Block h era where
- Block' !h !(TxSeq era) ByteString
- pattern Block ∷ ∀ era h. (Era era, EncCBORGroup (TxSeq era), EncCBOR h) ⇒ h → TxSeq era → Block h era
- pattern UnserialisedBlock ∷ h → TxSeq era → Block h era
- pattern UnsafeUnserialisedBlock ∷ h → TxSeq era → Block h era
- bheader ∷ Block h era → h
- bbody ∷ Block h era → TxSeq era
- neededTxInsForBlock ∷ ∀ h era. EraSegWits era ⇒ Block h era → Set TxIn
Documentation
Block' !h !(TxSeq era) ByteString |
pattern Block ∷ ∀ era h. (Era era, EncCBORGroup (TxSeq era), EncCBOR h) ⇒ h → TxSeq era → Block h era | |
pattern UnserialisedBlock ∷ h → TxSeq era → Block h era | Access a block without its serialised bytes. This is often useful when
we're using a |
pattern UnsafeUnserialisedBlock ∷ h → TxSeq era → Block h era | Unsafely construct a block without the ability to serialise its bytes. Anyone calling this pattern must ensure that the resulting block is never serialised. Any uses of this pattern outside of testing code should be regarded with suspicion. |
Instances
neededTxInsForBlock ∷ ∀ h era. EraSegWits era ⇒ Block h era → Set TxIn Source #
The validity of any individual block depends only on a subset of the UTxO stored in the ledger state. This function returns the transaction inputs corresponding to the required UTxO for a given Block.
This function will be used by the consensus layer to enable storing
the UTxO on disk. In particular, given a block, the consensus layer
will use neededTxInsForBlock
to retrieve the needed UTxO from disk
and present only those to the ledger.