Skip to main content

get_block_script_verify_flags_core

Function get_block_script_verify_flags_core 

Source
pub fn get_block_script_verify_flags_core(
    block_hash: &[u8; 32],
    height: u64,
    activation: &impl IsForkActive,
    network: Network,
) -> u32
Expand description

Bitcoin Core GetBlockScriptFlags (validation.cpp): start from SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_TAPROOT, replace with the script-flag exception entry when present, then OR buried deployments (BIP66, BIP65, CSV, BIP147-at-SegWit). Same block-level bitmask is passed to script checks for every non-coinbase transaction.

This is not the Orange Paper ยง5.2.6 piecewise GetBlockScriptFlags (exception vs per-tx CalculateScriptFlags); use get_block_script_flags for that formulation. connect_block uses this function for mainnet consensus parity with Bitcoin Core.