Module check

Source
Expand description

Transaction checks.

Code in this file can freely assume that no pre-V4 transactions are present.

Functions§

check_for_duplicates 🔒
Check for duplicate items in a collection.
coinbase_expiry_height
Returns Ok(()) if the expiry height for the coinbase transaction is valid according to specifications 7.1 and ZIP-203.
coinbase_outputs_are_decryptable
Checks compatibility with ZIP-212 shielded Sapling and Orchard coinbase output decryption
coinbase_tx_no_prevout_joinsplit_spend
Check that a coinbase transaction has no PrevOut inputs, JoinSplits, or spends.
consensus_branch_id
Checks the nConsensusBranchId field.
disabled_add_to_sprout_pool
Check if a transaction is adding to the sprout pool after Canopy network upgrade given a block height and a network.
has_enough_orchard_flags
Checks that the transaction has enough orchard flags.
has_inputs_and_outputs
Checks that the transaction has inputs and outputs.
joinsplit_has_vpub_zero
Check if JoinSplits in the transaction have one of its v_{pub} values equal to zero.
lock_time_has_passed
Checks if the transaction’s lock time allows this transaction to be included in a block.
non_coinbase_expiry_height
Returns Ok(()) if the expiry height for a non coinbase transaction is valid according to specifications 7.1 and ZIP-203.
spend_conflicts
Check if a transaction has any internal spend conflicts.
tx_transparent_coinbase_spends_maturity
Accepts a transaction, block height, block UTXOs, and the transaction’s spent UTXOs from the chain.
validate_expiry_height_max 🔒
Checks that the expiry height of a transaction does not exceed the maximal value.
validate_expiry_height_mined 🔒
Checks that a transaction does not exceed its expiry height.