update_engine: Add an explanatory comment
BUG=none
TEST=none
Change-Id: Ie13a696506dbfa28ed9b278ee6c2d99cb1156db0
Reviewed-on: https://chromium-review.googlesource.com/790942
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/payload_generator/delta_diff_utils.cc b/payload_generator/delta_diff_utils.cc
index 5a8bf8e..13027ab 100644
--- a/payload_generator/delta_diff_utils.cc
+++ b/payload_generator/delta_diff_utils.cc
@@ -823,7 +823,11 @@
}
// WARNING: We always set legacy |src_length| and |dst_length| fields for
- // BSDIFF. For SOURCE_BSDIFF we only set them for minor version 3 and lower.
+ // BSDIFF. For SOURCE_BSDIFF we only set them for minor version 3 and
+ // lower. This is needed because we used to use these two parameters in the
+ // SOURCE_BSDIFF for minor version 3 and lower, but we do not need them
+ // anymore in higher minor versions. This means if we stop adding these
+ // parameters for those minor versions, the delta payloads will be invalid.
if (operation.type() == InstallOperation::BSDIFF ||
(operation.type() == InstallOperation::SOURCE_BSDIFF &&
version.minor <= kOpSrcHashMinorPayloadVersion)) {