Function snarkvm_dpc::block::merkle_tree::merkle_root_with_subroots[][src]

pub fn merkle_root_with_subroots(
    hashes: &[[u8; 32]],
    subroots_depth: usize
) -> ([u8; 32], Vec<[u8; 32]>)
Expand description

Calculates a Merkle root and also returns the subroots at a desired depth. If the tree is too shallow to have subroots at that depth, returns the root as a single subroot.