Skip to main content

entry_chain_hash

Function entry_chain_hash 

Source
pub fn entry_chain_hash(
    prev_hash: &str,
    sequence: u64,
    event: &LedgerEvent,
) -> Result<String>
Expand description

Compute the chained hash for a record. The chain hash of one ledger entry — sha256(prev_hash || sequence || canonical(event)). Public so external tooling and tests appending rows produce chain-valid entries; the ledger’s integrity comes from verification on read, never from this function being private.