[ledger] Fix logs and comments on object digests.
Test: everything still builds
Change-Id: I72c679110c0233aac7761fe8e03d83f81edeeb4c
diff --git a/bin/ledger/storage/fake/fake_commit.cc b/bin/ledger/storage/fake/fake_commit.cc
index b5912f6..26b2c1c 100644
--- a/bin/ledger/storage/fake/fake_commit.cc
+++ b/bin/ledger/storage/fake/fake_commit.cc
@@ -34,7 +34,7 @@
uint64_t FakeCommit::GetGeneration() const { return journal_->GetGeneration(); }
ObjectIdentifier FakeCommit::GetRootIdentifier() const {
- // The object digest fake here: using journal id is arbitrary.
+ // The object digest is fake here: using journal id is arbitrary.
return encryption::MakeDefaultObjectIdentifier(
ObjectDigest(journal_->GetId()));
}
diff --git a/bin/ledger/storage/impl/page_storage_impl.h b/bin/ledger/storage/impl/page_storage_impl.h
index 149ca87..141288b 100644
--- a/bin/ledger/storage/impl/page_storage_impl.h
+++ b/bin/ledger/storage/impl/page_storage_impl.h
@@ -161,9 +161,8 @@
bool IsFirstCommit(CommitIdView id);
- // Adds the given synced object. |object_identifier| will be validated against
- // the expected one based on the |data| and an |OBJECT_DIGEST_MISSMATCH| error
- // will be returned in case of missmatch.
+ // Adds the given synced object. |object_identifier| is expected to match the
+ // given |data|.
void AddPiece(ObjectIdentifier object_identifier, ChangeSource source,
IsObjectSynced is_object_synced,
std::unique_ptr<DataSource::DataChunk> data,
diff --git a/bin/ledger/storage/impl/page_storage_unittest.cc b/bin/ledger/storage/impl/page_storage_unittest.cc
index f83c8fa..e5e7731 100644
--- a/bin/ledger/storage/impl/page_storage_unittest.cc
+++ b/bin/ledger/storage/impl/page_storage_unittest.cc
@@ -519,11 +519,11 @@
if (!called) {
return ::testing::AssertionFailure()
- << "TreeNode::FromDigest callback was not executed.";
+ << "TreeNode::FromIdentifier callback was not executed.";
}
if (status != Status::OK) {
return ::testing::AssertionFailure()
- << "TreeNode::FromDigest failed with status " << status;
+ << "TreeNode::FromIdentifier failed with status " << status;
}
node->swap(result);
return ::testing::AssertionSuccess();