Function bp_beefy::merkle_root
pub fn merkle_root<H, I>(leaves: I) -> <H as Hasher>::Outwhere
H: Hasher,
<H as Hasher>::Out: Default + AsRef<[u8]>,
I: IntoIterator,
<I as IntoIterator>::Item: AsRef<[u8]>,
Expand description
Construct a root hash of a Binary Merkle Tree created from given leaves.
See crate-level docs for details about Merkle Tree construction.
In case an empty list of leaves is passed the function returns a 0-filled hash.