Class MerkleProof
java.lang.Object
com.norswap.nanoeth.trees.patricia.MerkleProof
public final class MerkleProof extends Object
A proof that a key-value pair belongs to a tree. Note that the tree is question is not stored
in this object.
-
Field Summary
Fields Modifier and Type Field Description PatriciaNode[]
branch
Merkle tree nodes (in abridged form) on the branch from the root to the node (leaf or branch) that contains the value associated with the key, or to the deepest node that would have to be modified in order to insert a value for key (ifvalue
is null).byte[]
key
Key being proven.byte[]
value
Value whose association with the key is being proven, null if proving absence of value. -
Constructor Summary
Constructors Constructor Description MerkleProof(byte[] key, byte[] value, PatriciaNode[] branch)
-
Method Summary
Modifier and Type Method Description boolean
verify(MerkleRoot root)
-
Field Details
-
key
public final byte[] keyKey being proven. -
value
public final byte[] valueValue whose association with the key is being proven, null if proving absence of value. -
branch
Merkle tree nodes (in abridged form) on the branch from the root to the node (leaf or branch) that contains the value associated with the key, or to the deepest node that would have to be modified in order to insert a value for key (ifvalue
is null).
-
-
Constructor Details
-
MerkleProof
-
-
Method Details
-
verify
-