pub fn consensus_branch_id(
tx: &Transaction,
height: Height,
network: &Network,
) -> Result<(), TransactionError>Expand description
Checks the nConsensusBranchId field.
§Consensus
§7.1.2 Transaction Consensus Rules
[NU5 onward] If
effectiveVersion≥ 5, thenConsensusBranchIdfield MUST match the consensus branch ID used for SIGHASH transaction hashes, as specified in ZIP-244.
§Notes
-
When deserializing transactions, Zebra converts the
nConsensusBranchIdintoNetworkUpgrade. -
The values returned by
Transaction::versionmatcheffectiveVersionso we use them in place ofeffectiveVersion. More details inTransaction::version.