mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix some build errors
This commit is contained in:
@@ -1733,13 +1733,13 @@ class Loan_test : public beast::unit_test::suite
|
||||
state.periodicPayment);
|
||||
BEAST_EXPECT(
|
||||
paymentComponents.final ||
|
||||
roundedPeriodicPayment >=
|
||||
(paymentComponents.roundedPrincipal +
|
||||
paymentComponents.roundedInterest) &&
|
||||
roundedPeriodicPayment -
|
||||
(paymentComponents.roundedPrincipal +
|
||||
paymentComponents.roundedInterest) <
|
||||
3);
|
||||
((roundedPeriodicPayment >=
|
||||
(paymentComponents.roundedPrincipal +
|
||||
paymentComponents.roundedInterest)) &&
|
||||
(roundedPeriodicPayment -
|
||||
(paymentComponents.roundedPrincipal +
|
||||
paymentComponents.roundedInterest) <
|
||||
3)));
|
||||
|
||||
auto const borrowerBalanceBeforePayment =
|
||||
env.balance(borrower, broker.asset);
|
||||
|
||||
@@ -2495,27 +2495,7 @@ ValidLoan::finalize(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Must not be negative - STUInt32
|
||||
for (auto const field :
|
||||
{&sfOverpaymentFee,
|
||||
&sfInterestRate,
|
||||
&sfLateInterestRate,
|
||||
&sfCloseInterestRate,
|
||||
&sfOverpaymentInterestRate,
|
||||
&sfStartDate,
|
||||
&sfPaymentInterval,
|
||||
&sfGracePeriod,
|
||||
&sfPreviousPaymentDate,
|
||||
&sfPaymentRemaining})
|
||||
{
|
||||
if (after->at(*field) < 0)
|
||||
{
|
||||
JLOG(j.fatal()) << "Invariant failed: " << field->getName()
|
||||
<< " is negative ";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Must be positive
|
||||
// Must be positive - STNumber
|
||||
for (auto const field : {
|
||||
&sfPeriodicPayment,
|
||||
})
|
||||
|
||||
@@ -75,7 +75,7 @@ LoanPay::calculateBaseFee(ReadView const& view, STTx const& tx)
|
||||
// Let preclaim worry about the error for this
|
||||
return normalCost;
|
||||
auto const vaultSle = view.read(keylet::vault(loanSle->at(sfVaultID)));
|
||||
if (vaultSle)
|
||||
if (!vaultSle)
|
||||
// Let preclaim worry about the error for this
|
||||
return normalCost;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user