Function winter_crypto::build_merkle_nodes[][src]

pub fn build_merkle_nodes<H: Hasher>(leaves: &[H::Digest]) -> Vec<H::Digest>
Expand description

Returns the internal nodes of a Merkle tree defined by the specified leaves.

The internal nodes are turned as a vector where the root is stored at position 1, its children are stored at positions 2, 3, their children are stored at positions 4, 5, 6, 7 etc.

This function is exposed primarily for benchmarking purposes. It is not intended to be used directly by the end users of the crate.