| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Network.Tx
Description
Abstract view over transactions
The network layer does not make any concrete assumptions about what transactions or transaction identifiers look like.
Documentation
class (Eq (RawTxId txid), Ord (RawTxId txid), Show (RawTxId txid), NFData (RawTxId txid), NoThunks (RawTxId txid)) => HasRawTxId txid where Source #
Abstract over transaction identifiers, providing access to their raw byte representation for efficient comparison.
getRawTxId is used both as a faster equality proxy and as the key type
for shared lookup tables.
Law:
getRawTxId x == getRawTxId yiffx == y(raw equality is equivalent to txid equality; in particular, the raw bytes must uniquely identify the transaction so Map keys do not collide)
The Ord instance is only used to key ordered containers, so it does
not need to agree with the ordering of the underlying txid (e.g.
a serialised-bytes ordering is fine even when it sorts differently from
the txid's own Ord).
Methods
getRawTxId :: txid -> RawTxId txid Source #