address comments

This commit is contained in:
Yi Wu 2022-07-13 12:12:31 -07:00
parent d5ef201645
commit 9700823bff
2 changed files with 3 additions and 5 deletions

View File

@ -150,7 +150,7 @@ struct MutationRef {
uint8_t iv[AES_256_IV_LENGTH];
deterministicRandom()->randomBytes(iv, AES_256_IV_LENGTH);
BinaryWriter bw(AssumeVersion(g_network->protocolVersion()));
const_cast<MutationRef*>(this)->serialize(bw);
bw << *this;
EncryptBlobCipherAes265Ctr cipher(textCipherItr->second,
headerCipherItr->second,
iv,
@ -183,7 +183,7 @@ struct MutationRef {
}
ArenaReader reader(arena, plaintext, AssumeVersion(g_network->protocolVersion()));
MutationRef mutation;
mutation.serialize(reader);
reader >> mutation;
return mutation;
}

View File

@ -106,9 +106,7 @@ TraceEvent debugTagsAndMessageEnabled(const char* context, Version version, Stri
MutationRef m;
BinaryReader br(mutationData, AssumeVersion(rdr.protocolVersion()));
br >> m;
if (m.isEncrypted()) {
throw encrypt_unsupported();
}
ASSERT(!m.isEncrypted());
TraceEvent event = debugMutation(context, version, m, id);
if (event.isEnabled()) {
event.detail("MessageTags", msg.tags);