pub fn validate_template_hash(
tx: &Transaction,
input_index: usize,
expected_hash: &[u8],
) -> Result<bool, ConsensusError>Expand description
Validate template hash for CTV
Checks if the provided template hash matches the transaction’s template hash.
§Arguments
tx- The transaction to validateinput_index- The index of the input being verifiedexpected_hash- The expected template hash (32 bytes)
§Returns
true if template hash matches, false otherwise