mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove some unused variables, increase rounding tolerance
This commit is contained in:
@@ -1739,7 +1739,7 @@ class Loan_test : public beast::unit_test::suite
|
||||
roundedPeriodicPayment -
|
||||
(paymentComponents.roundedPrincipal +
|
||||
paymentComponents.roundedInterest) <
|
||||
2);
|
||||
3);
|
||||
|
||||
auto const borrowerBalanceBeforePayment =
|
||||
env.balance(borrower, broker.asset);
|
||||
|
||||
@@ -178,7 +178,7 @@ computePaymentComponents(
|
||||
Number const rawPrincipalOutstanding = loanPrincipalFromPeriodicPayment(
|
||||
periodicPayment, periodicRate, paymentRemaining);
|
||||
Number const rawInterestOutstanding =
|
||||
rawValueOutstanding - rawInterestOutstanding;
|
||||
rawValueOutstanding - rawPrincipalOutstanding;
|
||||
|
||||
/*
|
||||
* From the spec, once the periodicPayment is computed:
|
||||
@@ -514,8 +514,10 @@ doOverpayment(
|
||||
"nextDueDate is unchanged");
|
||||
nextDueDateProxy = nextDueDate;
|
||||
|
||||
/*
|
||||
auto const totalInterestOutstandingAfter =
|
||||
totalValueOutstanding - principalOutstanding;
|
||||
*/
|
||||
|
||||
return paymentParts;
|
||||
}
|
||||
@@ -623,7 +625,6 @@ handleFullPayment(
|
||||
// If this is the last payment, it has to be a regular payment
|
||||
return Unexpected(tesSUCCESS);
|
||||
|
||||
Number const rawValueOutstanding = periodicPayment * paymentRemaining;
|
||||
Number const rawPrincipalOutstanding = loanPrincipalFromPeriodicPayment(
|
||||
periodicPayment, periodicRate, paymentRemaining);
|
||||
|
||||
|
||||
@@ -162,8 +162,6 @@ LoanPay::preclaim(PreclaimContext const& ctx)
|
||||
return tefBAD_LEDGER;
|
||||
// LCOV_EXCL_STOP
|
||||
}
|
||||
auto const brokerPseudoAccount = loanBrokerSle->at(sfAccount);
|
||||
auto const brokerOwner = loanBrokerSle->at(sfOwner);
|
||||
auto const vaultID = loanBrokerSle->at(sfVaultID);
|
||||
auto const vaultSle = ctx.view.read(keylet::vault(vaultID));
|
||||
if (!vaultSle)
|
||||
|
||||
Reference in New Issue
Block a user