bitcoin::consensus::validation

Function verify_transaction

Source
pub fn verify_transaction<S>(
    tx: &Transaction,
    spent: S,
) -> Result<(), TxVerifyError>
where S: FnMut(&OutPoint) -> Option<TxOut>,
Available on crate feature bitcoinconsensus only.
Expand description

Verifies that this transaction is able to spend its inputs.

Shorthand for consensus::verify_transaction_with_flags with flag bitcoinconsensus::VERIFY_ALL.

The spent closure should not return the same TxOut twice!