public interface CheckedListProof<E> extends CheckedProof
HashCode expectedRootHash = // get a known root hash from block proof //
UncheckedListProof proof = new UncheckedListProofAdapter(rootProofNode, serializer);
// Check the proof
CheckedListProof checkedProof = proof.check();
// Check the root hash
if (checkedProof.isValid() && checkedProof.getRootHash().equals(expectedRootHash)) {
// Get and use elements
NavigableMap value = checkedProof.getElements();
}
Modifier and Type | Method and Description |
---|---|
java.util.NavigableMap<java.lang.Long,E> |
getElements()
Get all list elements.
|
ListProofStatus |
getProofStatus()
Returns the status of this proof: whether it is structurally valid.
|
getRootHash, isValid
java.util.NavigableMap<java.lang.Long,E> getElements()
java.lang.IllegalStateException
- if the proof is not validListProofStatus getProofStatus()
getProofStatus
in interface CheckedProof
Copyright © 2018 Exonum. All rights reserved.