Review feedback from @shawnxie999: broker owner count

Annotate loan broker owner set/delete owner count adjustment
This commit is contained in:
Ed Hennis
2025-11-24 16:40:37 -05:00
parent b7b0a65735
commit 7e6647e769
2 changed files with 4 additions and 0 deletions

View File

@@ -157,6 +157,8 @@ LoanBrokerDelete::doApply()
if (!owner)
return tefBAD_LEDGER; // LCOV_EXCL_LINE
// Decreases the owner count by two: one for the LoanBroker object, and
// one for the pseudo-account.
adjustOwnerCount(view(), owner, -2, j_);
}

View File

@@ -148,6 +148,8 @@ LoanBrokerSet::doApply()
if (auto const ter = dirLink(view, vaultPseudoID, broker, sfVaultNode))
return ter; // LCOV_EXCL_LINE
// Increases the owner count by two: one for the LoanBroker object, and
// one for the pseudo-account.
adjustOwnerCount(view, owner, 2, j_);
auto const ownerCount = owner->at(sfOwnerCount);
if (mPriorBalance < view.fees().accountReserve(ownerCount))