Skip to main content

try_verify_p2pk_fast_path

Function try_verify_p2pk_fast_path 

Source
pub fn try_verify_p2pk_fast_path(
    script_sig: &Vec<u8>,
    script_pubkey: &[u8],
    flags: u32,
    tx: &Transaction,
    input_index: usize,
    prevout_values: &[i64],
    prevout_script_pubkeys: &[&[u8]],
    block_height: Option<u64>,
    network: Network,
    sighash_cache: Option<&Arc<Mutex<HashMap<SighashCacheKey, [u8; 32], FxBuildHasher>>>>,
) -> Option<Result<bool, ConsensusError>>
Expand description

P2PK fast-path. Bare pay-to-pubkey: scriptPubKey is pubkey + OP_CHECKSIG, scriptSig is sig. Common in early blocks (coinbase outputs). Returns Some(Ok(bool)) if handled; None to fall back. Uses full transaction context (height, network) for BIP66 / signature validation.

For the Orange Paper VerifyScript contract (scriptSig + scriptPubKey + witness + flags), see verify_script, verify_script_with_context, and verify_script_with_context_full.