pub fn verify_script_with_context(
script_sig: &ByteString,
script_pubkey: &[u8],
witness: Option<&Witness>,
flags: u32,
tx: &Transaction,
input_index: usize,
prevouts: &[TransactionOutput],
block_height: Option<u64>,
network: Network,
) -> Result<bool>Expand description
VerifyScript with transaction context for signature verification
This version includes the full transaction context needed for proper Script verification with transaction context and optional block height.
Pass block_height whenever it is known; height-dependent fork rules (CLTV, CSV,
SegWit, Taproot) rely on it to select the correct evaluation path. Passing None
falls back to height 0 inside the engine, which means pre-activation rules are
used — valid only for regtest / test-vector scenarios.
For callers that also need to supply a pre-computed sighash or a specific
SigVersion, use verify_script_with_context_full directly.