LOG.info("Get wavelet snapshot", ex);
context.constructErrorResponse(operation, ex.toString());
return;
}
for (byte[] deltaBytes : history) {
ProtocolWaveletDelta delta;
try {
delta = ProtocolWaveletDelta.parseFrom(deltaBytes);
} catch (InvalidProtocolBufferException ex) {
throw new InvalidRequestException("Parse delta", operation, ex);
}
long currentVersion = 0;
if (waveletSnapshot != null) {
currentVersion = waveletSnapshot.snapshot.getVersion();
}
if (currentVersion == delta.getHashedVersion().getVersion()) {
if (importedFromVersion == -1) {
importedFromVersion = currentVersion;
}
ProtocolWaveletDelta newDelta;
try {
newDelta = setVersionHash(delta, waveletSnapshot, waveletName);
} catch (InvalidParticipantAddress ex) {
throw new InvalidRequestException("Convert delta", operation, ex);
}