pub fn verify_commitment_chain(
commitments: &[Commitment],
latest_commitment_hash: Hash,
) -> Result<ChainVerificationResult, ChainError>Expand description
Verifies a commitment chain from a collection of commitments.
This function takes a set of commitments and attempts to reconstruct
and verify the commitment chain by following the previous_commitment
references.
§Arguments
commitments- A collection of commitments to verifylatest_commitment_hash- The hash of the latest commitment (starting point)
§Returns
A ChainVerificationResult if the chain is valid, or a ChainError if invalid.