Function verify_hash_chain
pub fn verify_hash_chain<I>(
events: I,
encoding: &dyn JournalEncoding,
) -> Result<(), JournalError>Expand description
Verify the record-level blake3 hash chain across a sequence of events.
Every event must carry a record_hash. For each event:
- Recomputes the hash (encode with
record_hashset toNone, then blake3). - Compares with the stored
record_hash→RecordHashMismatchon mismatch. - Verifies
prev_record_hashmatches the previous event’srecord_hash→HashChainBreakon mismatch.