public interface UncheckedMapProof
byte[] key = "The key for which I want a proved value".getBytes();
HashCode expectedRootHash = // get a known root hash from block proof //
UncheckedMapProof proof = requestProofForKey(key);
// Convert to checked
CheckedMapProof checkedProof = proof.check();
// Check the root hash
if (checkedProof.compareWithRootHash(expectedRootHash)) {
// Get and use the value(s)
byte[] value = checked.get(key);
}
Modifier and Type | Method and Description |
---|---|
CheckedMapProof |
check()
Checks that a proof has either correct or incorrect structure and returns a CheckedMapProof.
|
CheckedMapProof check()
Copyright © 2018 Exonum. All rights reserved.