in src/main/java/software/amazon/qldb/tutorial/qldb/QldbRevision.java [182:196]
public void verifyRevisionHash() {
// Certain internal-only system revisions only contain a hash which cannot be
// further computed. However, these system hashes still participate to validate
// the journal block.
if (blockAddress == null || metadata == null || data == null) {
return;
}
try {
IonStruct metadataIon = (IonStruct) Constants.MAPPER.writeValueAsIonValue(metadata);
verifyRevisionHash(metadataIon, data, hash);
} catch (IOException e) {
throw new IllegalArgumentException("Could not encode revision metadata to ion.", e);
}
}