Function calculate_root
pub fn calculate_root<T, I>(hashes: I) -> Option<T>Expand description
Calculates the merkle root of an iterator of hashes.
ยงReturns
Noneifhashesis empty. The merkle root of an empty tree of hashes is undefined.Some(hash)ifhashescontains one element. A single hash is by definition the merkle root.Some(merkle_root)if length ofhashesis greater than one.