Function zebra_consensus::transaction::check::spend_conflicts
source · pub fn spend_conflicts(
transaction: &Transaction,
) -> Result<(), TransactionError>
Expand description
Check if a transaction has any internal spend conflicts.
An internal spend conflict happens if the transaction spends a UTXO more than once or if it reveals a nullifier more than once.
Consensus rules:
“each output of a particular transaction can only be used as an input once in the block chain. Any subsequent reference is a forbidden double spend- an attempt to spend the same satoshis twice.”
https://developer.bitcoin.org/devguide/block_chain.html#introduction
A nullifier MUST NOT repeat either within a transaction, or across transactions in a valid blockchain . Sprout and Sapling and Orchard nulliers are considered disjoint, even if they have the same bit pattern.