public static class PartialMerkleTree.Companion
@NotNull public PartialMerkleTree build(@NotNull MerkleTree merkleRoot, @NotNull java.util.List<? extends net.corda.core.crypto.SecureHash> includeHashes)
merkleRoot
- Root of full Merkle tree.includeHashes
- Hashes that should be included in a partial tree.@NotNull public SecureHash rootAndUsedHashes(@NotNull net.corda.core.crypto.PartialMerkleTree.PartialTree node, @NotNull java.util.List<net.corda.core.crypto.SecureHash> usedHashes)
Recursive calculation of root of this partial tree. Modifies usedHashes to later check for inclusion with hashes provided.
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).class SecureHash
of this partial Merkle tree.