pub fn validate_chain<F>(start: u64, next: F) -> Result<usize, ProvenanceError>Expand description
Walk a derivation / informing chain to validate bounded depth and the absence of cycles.
The caller supplies a closure that resolves each node ID to its (optional)
predecessor in the chain. The walk bails out with
ProvenanceError::CycleDetected if a node is revisited and with
ProvenanceError::ChainTooDeep after MAX_CHAIN_DEPTH hops.