Skip to main content

collect_hashes

Function collect_hashes 

Source
pub async fn collect_hashes<S: Store>(
    tree: &HashTree<S>,
    root: &Cid,
    concurrency: usize,
) -> Result<HashSet<Hash>, HashTreeError>
Expand description

Collect all hashes in a tree using parallel traversal

This walks the tree and collects all unique hashes (both tree nodes and blobs). Uses parallel fetching for efficiency.

§Arguments

  • tree - The HashTree instance with store access
  • root - Root CID to start from
  • concurrency - Number of concurrent fetches

§Returns

Set of all hashes in the tree