mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Cap the base fee for LoanPay based on loanMaximumPaymentsPerTransaction
This commit is contained in:
@@ -132,6 +132,9 @@ LoanPay::calculateBaseFee(ReadView const& view, STTx const& tx)
|
||||
|
||||
auto const regularPayment = roundPeriodicPayment(asset, loanSle->at(sfPeriodicPayment), scale) +
|
||||
loanSle->at(sfLoanServiceFee);
|
||||
if (view.rules().enabled(fixSecurity3_1_3) &&
|
||||
amount >= regularPayment * loanMaximumPaymentsPerTransaction)
|
||||
return loanMaximumPaymentsPerTransaction * normalCost;
|
||||
|
||||
// If making an overpayment, count it as a full payment because it will do
|
||||
// about the same amount of work, if not more.
|
||||
|
||||
Reference in New Issue
Block a user