merkle_node

Function merkle_node 

Source
pub fn merkle_node<'a>(
    items: &'a (impl Index<usize, Output = impl AsRef<[u8]> + ?Sized + 'a> + ?Sized),
    left: usize,
    right: usize,
    padded_len: usize,
) -> MerkleNodeRef<'a>
Expand description

Returns the root node of the Merkle tree containing the given items plus as many zero-hashes as necessary to bring the number of items up to padded_len.

With padded_len = items.len() this corresponds to the $N$ function defined in the “General Merklization” appendix of the GP, with $H = \mathcal{H}$ (the Blake 2b 256-bit hash function).