public static class PartialMerkleTree.Companion
Modifier and Type | Method and Description |
---|---|
PartialMerkleTree |
build(MerkleTree merkleRoot,
java.util.List<? extends net.corda.core.crypto.SecureHash> includeHashes) |
SecureHash |
rootAndUsedHashes(PartialMerkleTree.PartialTree node,
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.
|
public PartialMerkleTree build(MerkleTree merkleRoot, 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.public SecureHash rootAndUsedHashes(PartialMerkleTree.PartialTree node, 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.