private WaveletDelta transformSubmittedDelta(WaveletDelta submittedDelta)
throws OperationException, InvalidHashException {
HashedVersion targetVersion = submittedDelta.getTargetVersion();
HashedVersion currentVersion = getCurrentVersion();
Preconditions.checkArgument(!targetVersion.equals(currentVersion));
DeltaSequence serverDeltas =
waveletState.getTransformedDeltaHistory(targetVersion, currentVersion);
if (serverDeltas == null) {
LOG.warning("Attempt to apply delta at unknown hashed version " + targetVersion);
throw new InvalidHashException(currentVersion, targetVersion);
}
Preconditions.checkState(!serverDeltas.isEmpty(),
"No deltas between valid versions %s and %s", targetVersion, currentVersion);
ParticipantId clientAuthor = submittedDelta.getAuthor();
// TODO(anorth): remove this copy somehow; currently, it's necessary to
// ensure that clientOps.equals() works correctly below (because