From 2cf4fbd40e244b1ea80ae20495e7a50b7681afec Mon Sep 17 00:00:00 2001 From: Gregory Tsipenyuk Date: Wed, 15 May 2024 16:56:25 -0400 Subject: [PATCH] Resolve merge conflicts --- src/ripple/app/misc/impl/AMMHelpers.cpp | 2 +- src/ripple/app/paths/impl/BookStep.cpp | 2 +- src/ripple/app/tx/impl/AMMWithdraw.cpp | 4 ++-- src/ripple/protocol/impl/Feature.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ripple/app/misc/impl/AMMHelpers.cpp b/src/ripple/app/misc/impl/AMMHelpers.cpp index 33669dcdc1f..5ad59ea1c28 100644 --- a/src/ripple/app/misc/impl/AMMHelpers.cpp +++ b/src/ripple/app/misc/impl/AMMHelpers.cpp @@ -167,7 +167,7 @@ adjustAmountsByLPTokens( { bool const ammRoundingEnabled = [&]() { if (auto const& rules = getCurrentTransactionRules(); - rules && rules->enabled(fixAMMRounding)) + rules && rules->enabled(fixAMMv1_1)) return true; return false; }(); diff --git a/src/ripple/app/paths/impl/BookStep.cpp b/src/ripple/app/paths/impl/BookStep.cpp index 65dc8351680..4a43d653e0c 100644 --- a/src/ripple/app/paths/impl/BookStep.cpp +++ b/src/ripple/app/paths/impl/BookStep.cpp @@ -532,7 +532,7 @@ class BookOfferCrossingStep // Single path AMM offer has to factor in the transfer in rate // when calculating the upper bound quality and the quality function // because single path AMM's offer quality is not constant. - if (!rules.enabled(fixAMMRounding)) + if (!rules.enabled(fixAMMv1_1)) return ofrQ; else if ( offerType == OfferType::CLOB || diff --git a/src/ripple/app/tx/impl/AMMWithdraw.cpp b/src/ripple/app/tx/impl/AMMWithdraw.cpp index 73f7f1250ae..bde75505e15 100644 --- a/src/ripple/app/tx/impl/AMMWithdraw.cpp +++ b/src/ripple/app/tx/impl/AMMWithdraw.cpp @@ -312,7 +312,7 @@ AMMWithdraw::applyGuts(Sandbox& sb) // Due to rounding, the LPTokenBalance of the last LP // might not match the LP's trustline balance - if (sb.rules().enabled(fixAMMRounding)) + if (sb.rules().enabled(fixAMMv1_1)) { if (auto const res = isOnlyLiquidityProvider(sb, lpTokens.issue(), account_); @@ -495,7 +495,7 @@ AMMWithdraw::withdraw( // Should not happen since the only LP on last withdraw // has the balance set to the lp token trustline balance. - if (view.rules().enabled(fixAMMRounding) && + if (view.rules().enabled(fixAMMv1_1) && lpTokensWithdrawActual > lpTokensAMMBalance) { JLOG(ctx_.journal.debug()) diff --git a/src/ripple/protocol/impl/Feature.cpp b/src/ripple/protocol/impl/Feature.cpp index 2dd6e361408..ae7a8291bb4 100644 --- a/src/ripple/protocol/impl/Feature.cpp +++ b/src/ripple/protocol/impl/Feature.cpp @@ -466,7 +466,7 @@ REGISTER_FEATURE(PriceOracle, Supported::yes, VoteBehavior::De REGISTER_FIX (fixEmptyDID, Supported::yes, VoteBehavior::DefaultNo); REGISTER_FIX (fixXChainRewardRounding, Supported::yes, VoteBehavior::DefaultNo); REGISTER_FIX (fixPreviousTxnID, Supported::yes, VoteBehavior::DefaultNo); -REGISTER_FIX (fixAMMv1_1, Supported::yes, VoteBehavior::DefaultNo); +REGISTER_FIX (fixAMMv1_1, Supported::yes, VoteBehavior::DefaultNo); // The following amendments are obsolete, but must remain supported // because they could potentially get enabled.