corda / net.corda.core.transactions / WireTransaction / merkleTree

merkleTree

val merkleTree: MerkleTree

Builds whole Merkle tree for a transaction. Briefly, each component group has its own sub Merkle tree and all of the roots of these trees are used as leaves in a top level Merkle tree. Note that ordering of elements inside a ComponentGroup matters when computing the Merkle root. On the other hand, insertion group ordering does not affect the top level Merkle tree construction, as it is actually an ordered Merkle tree, where its leaves are ordered based on the group ordinal in ComponentGroupEnum. If any of the groups is an empty list or a null object, then SecureHash.allOnesHash is used as its hash. Also, privacySalt is not a Merkle tree leaf, because it is already "inherently" included via the component nonces.

Getter

Builds whole Merkle tree for a transaction. Briefly, each component group has its own sub Merkle tree and all of the roots of these trees are used as leaves in a top level Merkle tree. Note that ordering of elements inside a ComponentGroup matters when computing the Merkle root. On the other hand, insertion group ordering does not affect the top level Merkle tree construction, as it is actually an ordered Merkle tree, where its leaves are ordered based on the group ordinal in ComponentGroupEnum. If any of the groups is an empty list or a null object, then SecureHash.allOnesHash is used as its hash. Also, privacySalt is not a Merkle tree leaf, because it is already "inherently" included via the component nonces.