Skip to main content

verify_tree_head_sequential

Function verify_tree_head_sequential 

Source
pub fn verify_tree_head_sequential(
    tree_size: u64,
    root_hash: [u8; 32],
    timestamp_ns: i64,
    signature: &[u8],
    public_key: &[u8],
    previous_timestamp_ns: i64,
) -> bool
Expand description

Verifies an STH and enforces that its timestamp is strictly later than previous_timestamp_ns. Returns false if timestamp_ns <= previous_timestamp_ns or if the signature is invalid. Use this when processing a sequence of STHs to guard against replayed or out-of-order tree heads.