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.