add server logging (#7645)

This commit is contained in:
Peter Chen
2026-06-26 09:40:16 -07:00
committed by GitHub
parent 734811d1dd
commit f96d50b487
8 changed files with 126 additions and 20 deletions

View File

@@ -5029,6 +5029,24 @@ class Invariants_test : public beast::unit_test::Suite
{tecINVARIANT_FAILED, tecINVARIANT_FAILED},
precloseConfidential);
doInvariantCheck(
{"MPToken encrypted field existence inconsistency"},
[&mptID](Account const& a1, Account const& a2, ApplyContext& ac) {
auto sleToken = ac.view().peek(keylet::mptoken(mptID, a2.id()));
if (!sleToken)
return false;
sleToken->makeFieldAbsent(sfIssuerEncryptedBalance);
sleToken->makeFieldAbsent(sfConfidentialBalanceInbox);
sleToken->makeFieldAbsent(sfConfidentialBalanceSpending);
sleToken->setFieldVL(sfAuditorEncryptedBalance, Blob{0x00});
ac.view().update(sleToken);
return true;
},
XRPAmount{},
STTx{ttMPTOKEN_AUTHORIZE, [](STObject&) {}},
{tecINVARIANT_FAILED, tecINVARIANT_FAILED},
precloseConfidential);
// requiresPrivacyFlag
auto const precloseNoPrivacy = [&mptID](
Account const& a1, Account const& a2, Env& env) -> bool {