Function breez_sdk_liquid::bitcoin::util::hash::bitcoin_merkle_root
pub fn bitcoin_merkle_root<T, I>(hashes: I) -> Option<T>
Expand description
Calculates the merkle root of an iterator of hashes.
ยงReturns
None
ifhashes
is empty. The merkle root of an empty tree of hashes is undefined.Some(hash)
ifhashes
contains one element. A single hash is by definition the merkle root.Some(merkle_root)
if length ofhashes
is greater than one.