mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add comment to totalPaidToVaultForDebt in LoanPay.cpp
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
This commit is contained in:
@@ -388,6 +388,11 @@ LoanPay::doApply()
|
||||
!asset.integral() || totalPaidToVaultRaw == totalPaidToVaultRounded,
|
||||
"ripple::LoanPay::doApply",
|
||||
"rounding does nothing for integral asset");
|
||||
// Account for value changes when reducing the broker's debt:
|
||||
// - Positive value change (from full/late/overpayments): Subtract from the
|
||||
// amount credited toward debt to avoid over-reducing the debt.
|
||||
// - Negative value change (from full/overpayments): Add to the amount
|
||||
// credited toward debt,effectively increasing the debt reduction.
|
||||
auto const totalPaidToVaultForDebt =
|
||||
totalPaidToVaultRaw - paymentParts->valueChange;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user