pre-commit run --all-files

This commit is contained in:
tequ
2026-03-18 00:03:31 +09:00
parent 37c95ead69
commit 8baec5634c
2 changed files with 19 additions and 16 deletions

View File

@@ -84,11 +84,12 @@ LoanSet::preflight(PreflightContext const& ctx)
!validNumericMinimum(paymentInterval, LoanSet::minPaymentInterval))
return temINVALID;
// Grace period is between min default value and payment interval
else if (auto const gracePeriod = tx[~sfGracePeriod]; //
!validNumericRange(
gracePeriod,
paymentInterval.value_or(LoanSet::defaultPaymentInterval),
defaultGracePeriod))
else if (
auto const gracePeriod = tx[~sfGracePeriod]; //
!validNumericRange(
gracePeriod,
paymentInterval.value_or(LoanSet::defaultPaymentInterval),
defaultGracePeriod))
return temINVALID;
// Copied from preflight2

View File

@@ -602,9 +602,10 @@ SetTrust::doApply()
terResult = trustDelete(view(), sleRippleState, uLowAccountID, uHighAccountID, viewJ);
}
// Reserve is not scaled by load.
else if (auto const ret = checkInsufficientReserve(
view(), ctx_.tx, sle, preFeeBalance_, txSponsorSle, 0);
!freeTrustLine && bReserveIncrease && !isTesSuccess(ret))
else if (
auto const ret =
checkInsufficientReserve(view(), ctx_.tx, sle, preFeeBalance_, txSponsorSle, 0);
!freeTrustLine && bReserveIncrease && !isTesSuccess(ret))
{
JLOG(j_.trace()) << "Delay transaction: Insufficent reserve to "
"add trust line.";
@@ -632,14 +633,15 @@ SetTrust::doApply()
JLOG(j_.trace()) << "Redundant: Setting non-existent ripple line to defaults.";
return tecNO_LINE_REDUNDANT;
}
else if (auto const ret = checkInsufficientReserve(
ctx_.view(),
ctx_.tx,
sle,
preFeeBalance_,
txSponsorSle,
1);
!freeTrustLine && !isTesSuccess(ret)) // Reserve is not scaled by load.
else if (
auto const ret = checkInsufficientReserve(
ctx_.view(),
ctx_.tx,
sle,
preFeeBalance_,
txSponsorSle,
1);
!freeTrustLine && !isTesSuccess(ret)) // Reserve is not scaled by load.
{
JLOG(j_.trace()) << "Delay transaction: Line does not exist. "
"Insufficent reserve to create line.";