Function breez_sdk_liquid::bitcoin::util::hash::bitcoin_merkle_root_inline
pub fn bitcoin_merkle_root_inline<T>(hashes: &mut [T]) -> Option<T>
Expand description
Calculates the merkle root of a list of hashes, inline (in place) in hashes
.
In most cases, you’ll want to use bitcoin_merkle_root instead.
§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.