pub fn verify(
script_pubkey: &ScriptPubkey,
amount: Option<i64>,
tx_to: &Transaction,
input_index: u32,
flags: Option<u32>,
spent_outputs: &[TxOut],
) -> Result<(), KernelError>Expand description
Verifies a transaction input against its corresponding output script.
§Arguments
script_pubkey- The output script to verify againstamount- Needs to be set if the segwit flag is settx_to- The transaction containing the input to verifyinput_index- The index of the input withintx_toto verifyflags- Defaults to all if nonespent_output- The outputs being spent by this transaction
§Returns
Ok(())if verification succeedsKernelError::ScriptVerifyan error describing the failure