PartialMerkleTree.rootAndUsedHashes - corda

corda / net.corda.core.crypto / PartialMerkleTree / rootAndUsedHashes

# rootAndUsedHashes

`fun rootAndUsedHashes(node: PartialTree, usedHashes: MutableList<SecureHash>): SecureHash`

Recursive calculation of root of this partial tree. Modifies usedHashes to later check for inclusion with hashes provided.

### Parameters

`node` - the partial Merkle tree for which we want to calculate the Merkle root.

`usedHashes` - a mutable list that at the end of this recursive algorithm, it will consist of the included leaves (hashes of the visible components).

Return
the root SecureHash of this partial Merkle tree.