pub fn merge_subtrees_root(
left_child: &ChainingValue,
right_child: &ChainingValue,
mode: Mode<'_>,
) -> Hash
Expand description
Compute a root hash from two child chaining values.
See the module level examples, particularly the discussion of valid tree
structures. The left and right child chaining values can come from either
Hasher::finalize_non_root
or merge_subtrees_non_root
.
“Chaining value” is the academic term for a non-root or non-final hash.
Note that inputs of CHUNK_LEN
or less don’t produce any parent nodes and can’t be hashed
using this function. In that case you must get the root hash from Hasher::finalize
(or just
blake3::hash
).