Skip to content

Commit 27200ab

Browse files
committed
treat unimpaired loan
1 parent 335b9be commit 27200ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/xrpld/app/tx/detail/LoanPay.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,13 @@ LoanPay::doApply()
305305
// change will be discarded.
306306
if (loanSle->isFlag(lsfLoanImpaired))
307307
{
308-
LoanManage::unimpairLoan(view, loanSle, vaultSle, j_);
308+
if (auto const ret =
309+
LoanManage::unimpairLoan(view, loanSle, vaultSle, j_);
310+
ret != tesSUCCESS)
311+
{
312+
JLOG(j_.fatal()) << "Failed to unimpair loan before payment.";
313+
return ret; // LCOV_EXCL_LINE
314+
}
309315
}
310316

311317
LoanPaymentType const paymentType = [&tx]() {

0 commit comments

Comments
 (0)