mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-05 16:57:56 +00:00
Another arbitrary test case to try
This commit is contained in:
@@ -6072,18 +6072,18 @@ failed with assertion error: Both principal and interest rounded are zero 0 + 0
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
BrokerParameters const brokerParams{
|
BrokerParameters const brokerParams{
|
||||||
.vaultDeposit = 1'000'000'000,
|
.vaultDeposit = 10000,
|
||||||
.debtMax = 0,
|
.debtMax = 0,
|
||||||
.coverRateMin = TenthBips32{0},
|
.coverRateMin = TenthBips32{0},
|
||||||
.managementFeeRate = TenthBips16{5919},
|
// .managementFeeRate = TenthBips16{5919},
|
||||||
.coverRateLiquidation = TenthBips32{0}};
|
.coverRateLiquidation = TenthBips32{0}};
|
||||||
LoanParameters const loanParams{
|
LoanParameters const loanParams{
|
||||||
.account = Account("lender"),
|
.account = Account("lender"),
|
||||||
.counter = Account("borrower"),
|
.counter = Account("borrower"),
|
||||||
.principalRequest = Number{1255438, -6},
|
.principalRequest = Number{10000, 0},
|
||||||
.interest = TenthBips32{1922},
|
// .interest = TenthBips32{0},
|
||||||
.payTotal = 5816,
|
// .payTotal = 5816,
|
||||||
.payInterval = 29193};
|
.payInterval = 150};
|
||||||
|
|
||||||
{
|
{
|
||||||
Env env(*this, beast::severities::kWarning);
|
Env env(*this, beast::severities::kWarning);
|
||||||
@@ -6092,9 +6092,10 @@ failed with assertion error: Both principal and interest rounded are zero 0 + 0
|
|||||||
auto const props = computeLoanProperties(
|
auto const props = computeLoanProperties(
|
||||||
asset,
|
asset,
|
||||||
asset(loanParams.principalRequest).number(),
|
asset(loanParams.principalRequest).number(),
|
||||||
*loanParams.interest,
|
loanParams.interest.value_or(TenthBips32{}),
|
||||||
*loanParams.payInterval,
|
loanParams.payInterval.value_or(
|
||||||
*loanParams.payTotal,
|
LoanSet::defaultPaymentInterval),
|
||||||
|
loanParams.payTotal.value_or(LoanSet::defaultPaymentTotal),
|
||||||
brokerParams.managementFeeRate);
|
brokerParams.managementFeeRate);
|
||||||
log << "Loan properties:\n"
|
log << "Loan properties:\n"
|
||||||
<< "\tPeriodic Payment: " << props.periodicPayment << std::endl
|
<< "\tPeriodic Payment: " << props.periodicPayment << std::endl
|
||||||
@@ -6108,9 +6109,9 @@ failed with assertion error: Both principal and interest rounded are zero 0 + 0
|
|||||||
// checkGuards returns a TER, so success is 0
|
// checkGuards returns a TER, so success is 0
|
||||||
BEAST_EXPECT(!LoanSet::checkGuards(
|
BEAST_EXPECT(!LoanSet::checkGuards(
|
||||||
asset,
|
asset,
|
||||||
loanParams.principalRequest,
|
asset(loanParams.principalRequest).number(),
|
||||||
*loanParams.interest,
|
loanParams.interest.value_or(TenthBips32{}),
|
||||||
*loanParams.payTotal,
|
loanParams.payTotal.value_or(LoanSet::defaultPaymentTotal),
|
||||||
props,
|
props,
|
||||||
env.journal));
|
env.journal));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user