Skip to main content

mempool_standard_input_scripts

Function mempool_standard_input_scripts 

Source
pub fn mempool_standard_input_scripts(
    tx: &Transaction,
    spent_outputs: &[Output],
) -> Result<(), TransactionError>
Expand description

Standardness (policy) checks on a mempool transaction’s transparent input scripts, applied before the transaction is dispatched to script verification. The goal is to avoid the expensive verification for non-standard transactions which would be rejected anyway by Storage::reject_if_non_standard_tx(); this is a subset of the checks in that function.

spent_outputs must contain the output spent by each of the transaction’s transparent inputs, in input order.

§Correctness

spent_outputs.len() must equal the number of transparent inputs in tx: if the lengths differ, zip() silently truncates, and some inputs are not checked.