| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Util.Serialisation.TxWireSize
Synopsis
- prop_txWireSize ∷ (SerialiseNodeToNode blk (GenTx blk), TxLimits blk) ⇒ (GenTx blk → Maybe String) → CodecConfig blk → WithVersion (BlockNodeToNodeVersion blk) (GenTx blk) → Property
- prop_txWireSize_txSubmission ∷ (SerialiseNodeToNode blk (GenTx blk), TxLimits blk) ⇒ CodecConfig blk → WithVersion (BlockNodeToNodeVersion blk) (GenTx blk) → Property
Documentation
Arguments
| ∷ (SerialiseNodeToNode blk (GenTx blk), TxLimits blk) | |
| ⇒ (GenTx blk → Maybe String) | show tx bytes |
| → CodecConfig blk | |
| → WithVersion (BlockNodeToNodeVersion blk) (GenTx blk) | |
| → Property |
Verify that txWriteSize is very close to the real tx size.
The txWireSize doesn't take into account if HFC is enabled or not. If it
is enabled, the wireTxSize for `GenTx (HardForkBlock xs)` will agree with
the encoded size, but if it is disabled it will overestimate the value by HFC
envelope (at most 3 bytes, 2 for forcible future)
prop_txWireSize_txSubmission ∷ (SerialiseNodeToNode blk (GenTx blk), TxLimits blk) ⇒ CodecConfig blk → WithVersion (BlockNodeToNodeVersion blk) (GenTx blk) → Property Source #
Verify that txWriteSize agrees with the encoded GenTx size up to
config_MX_TX_SIZE_DISCREPANCY allowed by `tx-submission` mini-protocol.
NOTE: txs which do not satisfy this property will terminate connections.