mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 01:07:57 +00:00
Review feedback from @shawnxie999: broker owner count
Annotate loan broker owner set/delete owner count adjustment
This commit is contained in:
@@ -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_);
|
||||
}
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user