Skip to main content

block_diff

Function block_diff 

Source
pub fn block_diff<S, F>(
    storage: S,
    prev: Option<Cid>,
    next: Cid,
    block_links: BlockLinks,
    look_ahead_depth: Option<u8>,
    follow: F,
) -> impl Stream<Item = Result<BlockDiff, StorageError>>
where S: BlockStorage + Clone + 'static, F: BlockDiffFollow + 'static,
Expand description

Find added/removed references in blocks. If a Cid is referenced multiple times it will also returnes multiple times. This diff works recursively - all added/removed Cid at any depth will be returned. However there is a look-ahead depth limit, how many nodes are looked down to reuse references (defaults to 1).