mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-27 09:00:32 +00:00
Start fixing the AMMExtended tests
This commit is contained in:
@@ -26,6 +26,9 @@ namespace test {
|
||||
*/
|
||||
struct AMMExtended_test : public jtx::AMMTest
|
||||
{
|
||||
// Use small Number mantissas for the life of this test.
|
||||
NumberMantissaScaleGuard const sg_{ripple::MantissaRange::small};
|
||||
|
||||
private:
|
||||
void
|
||||
testRmFundedOffer(FeatureBitset features)
|
||||
@@ -42,6 +45,11 @@ private:
|
||||
// funded and not used for the payment.
|
||||
|
||||
using namespace jtx;
|
||||
// For now, just disable SAV entirely, which locks in the small Number
|
||||
// mantissas
|
||||
features =
|
||||
features - featureSingleAssetVault /* - featureLendingProtocol */;
|
||||
|
||||
Env env{*this, features};
|
||||
|
||||
fund(
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace test {
|
||||
struct AMM_test : public jtx::AMMTest
|
||||
{
|
||||
// Use small Number mantissas for the life of this test.
|
||||
NumberMantissaScaleGuard sg_{ripple::MantissaRange::small};
|
||||
NumberMantissaScaleGuard const sg_{ripple::MantissaRange::small};
|
||||
|
||||
private:
|
||||
void
|
||||
|
||||
@@ -42,9 +42,11 @@ AMMLiquidity<TIn, TOut>::generateFibSeqOffer(
|
||||
{
|
||||
TAmounts<TIn, TOut> cur{};
|
||||
|
||||
Number const initialFibSeqPct =
|
||||
Number{InitialFibSeqPct.mantissa(), InitialFibSeqPct.exponent()};
|
||||
cur.in = toAmount<TIn>(
|
||||
getIssue(balances.in),
|
||||
InitialFibSeqPct * initialBalances_.in,
|
||||
initialFibSeqPct * initialBalances_.in,
|
||||
Number::rounding_mode::upward);
|
||||
cur.out = swapAssetIn(initialBalances_, cur.in, tradingFee_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user