multi_proof

Function multi_proof 

Source
pub async fn multi_proof<D: Digest, S: Storage<D>>(
    mmr: &S,
    locations: &[Location],
) -> Result<Proof<D>, Error>
Expand description

Return an inclusion proof for the elements at the specified locations. This is analogous to range_proof but supports non-contiguous locations.

The order of positions does not affect the output (sorted internally).

ยงErrors

Returns Error::LocationOverflow if any location in locations > crate::mmr::MAX_LOCATION Returns Error::RangeOutOfBounds if any location in locations > mmr.size() Returns Error::ElementPruned if some element needed to generate the proof has been pruned Returns Error::Empty if locations is empty