mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-27 00:50:45 +00:00
Review feedback from @Tapanito: tecKILLED logs
- Log messages explaining Loan-related tecKILLED returns.
This commit is contained in:
@@ -219,18 +219,32 @@ LoanSet::preclaim(PreclaimContext const& ctx)
|
||||
// The grace period can't be larger than the interval. Check it first,
|
||||
// mostly so that unit tests can test that specific case.
|
||||
if (grace > timeAvailable)
|
||||
{
|
||||
JLOG(ctx.j.warn()) << "Grace period exceeds protocol time limit.";
|
||||
return tecKILLED;
|
||||
}
|
||||
|
||||
if (interval > timeAvailable)
|
||||
{
|
||||
JLOG(ctx.j.warn())
|
||||
<< "Payment interval exceeds protocol time limit.";
|
||||
return tecKILLED;
|
||||
}
|
||||
|
||||
if (total > timeAvailable)
|
||||
{
|
||||
JLOG(ctx.j.warn()) << "Payment total exceeds protocol time limit.";
|
||||
return tecKILLED;
|
||||
}
|
||||
|
||||
auto const timeLastPayment = timeAvailable - grace;
|
||||
|
||||
if (timeLastPayment / interval < total)
|
||||
{
|
||||
JLOG(ctx.j.warn()) << "Last payment due date, or grace period for "
|
||||
"last payment exceeds protocol time limit.";
|
||||
return tecKILLED;
|
||||
}
|
||||
}
|
||||
|
||||
auto const account = tx[sfAccount];
|
||||
|
||||
Reference in New Issue
Block a user