Compute a Merkle root from the provided leaf hashes. If non-null, *mutated is set to true if two identical hashes are paired at any tree level before the odd-count hash duplication step, and false otherwise.
Declared in <consensus/merkle.h>
uint256
ComputeMerkleRoot(
std::vector<uint256> hashes,
bool* mutated = nullptr);
The Merkle root of the given hashes.
| Name | Description |
|---|---|
| hashes | The leaf hashes to build the tree from. |
| mutated | If non-null, receives whether a pair of identical hashes was detected. |