mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Retire fix1781 amendment (#5931)
* Retired fix1781 amendment Signed-off-by: Pratik Mankawde <pmankawde@ripple.com> * refactor: Retire fix1781 amendment Amendments activated for more than 2 years can be retired. This change retires the fix1781 amendment. --------- Signed-off-by: Pratik Mankawde <pmankawde@ripple.com> Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
This commit is contained in:
@@ -2819,15 +2819,9 @@ private:
|
||||
testcase("Circular XRP");
|
||||
|
||||
using namespace jtx;
|
||||
|
||||
for (auto const withFix : {true, false})
|
||||
{
|
||||
auto const feats = withFix
|
||||
? testable_amendments()
|
||||
: testable_amendments() - FeatureBitset{fix1781};
|
||||
|
||||
// Payment path starting with XRP
|
||||
Env env(*this, feats);
|
||||
Env env(*this, testable_amendments());
|
||||
// Note, if alice doesn't have default ripple, then pay
|
||||
// fails with tecPATH_DRY.
|
||||
fund(
|
||||
@@ -2842,8 +2836,7 @@ private:
|
||||
AMM ammAliceXRP_EUR(env, alice, XRP(100), EUR(101));
|
||||
env.close();
|
||||
|
||||
TER const expectedTer =
|
||||
withFix ? TER{temBAD_PATH_LOOP} : TER{tesSUCCESS};
|
||||
TER const expectedTer = TER{temBAD_PATH_LOOP};
|
||||
env(pay(alice, bob, EUR(1)),
|
||||
path(~USD, ~XRP, ~EUR),
|
||||
sendmax(XRP(1)),
|
||||
|
||||
@@ -1190,38 +1190,30 @@ struct Flow_test : public beast::unit_test::suite
|
||||
auto const USD = gw["USD"];
|
||||
auto const EUR = gw["EUR"];
|
||||
|
||||
for (auto const withFix : {true, false})
|
||||
{
|
||||
auto const feats = [&withFix]() -> FeatureBitset {
|
||||
if (withFix)
|
||||
return testable_amendments();
|
||||
return testable_amendments() - FeatureBitset{fix1781};
|
||||
}();
|
||||
{
|
||||
// Payment path starting with XRP
|
||||
Env env(*this, feats);
|
||||
env.fund(XRP(10000), alice, bob, gw);
|
||||
env.close();
|
||||
env.trust(USD(1000), alice, bob);
|
||||
env.trust(EUR(1000), alice, bob);
|
||||
env.close();
|
||||
env(pay(gw, alice, USD(100)));
|
||||
env(pay(gw, alice, EUR(100)));
|
||||
env.close();
|
||||
// Payment path starting with XRP
|
||||
Env env(*this, testable_amendments());
|
||||
env.fund(XRP(10000), alice, bob, gw);
|
||||
env.close();
|
||||
env.trust(USD(1000), alice, bob);
|
||||
env.trust(EUR(1000), alice, bob);
|
||||
env.close();
|
||||
env(pay(gw, alice, USD(100)));
|
||||
env(pay(gw, alice, EUR(100)));
|
||||
env.close();
|
||||
|
||||
env(offer(alice, XRP(100), USD(100)), txflags(tfPassive));
|
||||
env(offer(alice, USD(100), XRP(100)), txflags(tfPassive));
|
||||
env(offer(alice, XRP(100), EUR(100)), txflags(tfPassive));
|
||||
env.close();
|
||||
env(offer(alice, XRP(100), USD(100)), txflags(tfPassive));
|
||||
env(offer(alice, USD(100), XRP(100)), txflags(tfPassive));
|
||||
env(offer(alice, XRP(100), EUR(100)), txflags(tfPassive));
|
||||
env.close();
|
||||
|
||||
TER const expectedTer = TER{temBAD_PATH_LOOP};
|
||||
env(pay(alice, bob, EUR(1)),
|
||||
path(~USD, ~XRP, ~EUR),
|
||||
sendmax(XRP(1)),
|
||||
txflags(tfNoRippleDirect),
|
||||
ter(expectedTer));
|
||||
|
||||
TER const expectedTer =
|
||||
withFix ? TER{temBAD_PATH_LOOP} : TER{tesSUCCESS};
|
||||
env(pay(alice, bob, EUR(1)),
|
||||
path(~USD, ~XRP, ~EUR),
|
||||
sendmax(XRP(1)),
|
||||
txflags(tfNoRippleDirect),
|
||||
ter(expectedTer));
|
||||
}
|
||||
pass();
|
||||
}
|
||||
{
|
||||
|
||||
@@ -362,16 +362,12 @@ XRPEndpointStep<TDerived>::check(StrandContext const& ctx) const
|
||||
if (ter != tesSUCCESS)
|
||||
return ter;
|
||||
|
||||
if (ctx.view.rules().enabled(fix1781))
|
||||
auto const issuesIndex = isLast_ ? 0 : 1;
|
||||
if (!ctx.seenDirectIssues[issuesIndex].insert(xrpIssue()).second)
|
||||
{
|
||||
auto const issuesIndex = isLast_ ? 0 : 1;
|
||||
if (!ctx.seenDirectIssues[issuesIndex].insert(xrpIssue()).second)
|
||||
{
|
||||
JLOG(j_.debug())
|
||||
<< "XRPEndpointStep: loop detected: Index: " << ctx.strandSize
|
||||
<< ' ' << *this;
|
||||
return temBAD_PATH_LOOP;
|
||||
}
|
||||
JLOG(j_.debug()) << "XRPEndpointStep: loop detected: Index: "
|
||||
<< ctx.strandSize << ' ' << *this;
|
||||
return temBAD_PATH_LOOP;
|
||||
}
|
||||
|
||||
return tesSUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user