Skip to content

Commit

Permalink
Always enable fix1449 dated March 30, 2017 20:00:00 UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
scottschurr authored and manojsdoshi committed Jan 30, 2020
1 parent 9c580b2 commit ae707b8
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 318 deletions.
3 changes: 1 addition & 2 deletions src/ripple/app/paths/impl/DirectStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,7 @@ DirectIPaymentStep::check (
return terNO_AUTH;
}

if (ctx.prevStep &&
fix1449(ctx.view.info().parentCloseTime))
if (ctx.prevStep)
{
if (ctx.prevStep->bookStepBook())
{
Expand Down
3 changes: 0 additions & 3 deletions src/ripple/ledger/View.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,6 @@ transferXRP (ApplyView& view,
STAmount const& amount,
beast::Journal j);

[[nodiscard]] NetClock::time_point const& fix1449Time ();
[[nodiscard]] bool fix1449 (NetClock::time_point const closeTime);

} // ripple

#endif
14 changes: 0 additions & 14 deletions src/ripple/ledger/impl/View.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@

namespace ripple {

NetClock::time_point const& fix1449Time ()
{
using namespace std::chrono_literals;
// Thurs, Mar 30, 2017 20:00:00 UTC
static NetClock::time_point const soTime{544219200s};

return soTime;
}

bool fix1449 (NetClock::time_point const closeTime)
{
return closeTime > fix1449Time();
}

//------------------------------------------------------------------------------
//
// Observers
Expand Down
46 changes: 0 additions & 46 deletions src/test/app/Check_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ class Check_test : public beast::unit_test::suite
// If the Checks amendment is not enabled, you should not be able
// to create, cash, or cancel checks.
Env env {*this, supported_amendments() - featureChecks};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), alice);

Expand All @@ -189,9 +186,6 @@ class Check_test : public beast::unit_test::suite
// If the Checks amendment is enabled all check-related
// facilities should be available.
Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), alice);

Expand Down Expand Up @@ -226,9 +220,6 @@ class Check_test : public beast::unit_test::suite
IOU const USD {gw["USD"]};

Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

STAmount const startBalance {XRP(1000).value()};
env.fund (startBalance, gw, alice, bob);
Expand Down Expand Up @@ -327,9 +318,6 @@ class Check_test : public beast::unit_test::suite
IOU const USD {gw1["USD"]};

Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

STAmount const startBalance {XRP(1000).value()};
env.fund (startBalance, gw1, gwF, alice, bob);
Expand Down Expand Up @@ -507,9 +495,6 @@ class Check_test : public beast::unit_test::suite
Account const bob {"bob"};

Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

XRPAmount const baseFeeDrops {env.current()->fees().base};
STAmount const startBalance {XRP(300).value()};
Expand Down Expand Up @@ -632,9 +617,6 @@ class Check_test : public beast::unit_test::suite
{
// Simple IOU check cashed with Amount (with failures).
Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob);

Expand Down Expand Up @@ -754,9 +736,6 @@ class Check_test : public beast::unit_test::suite
{
// Simple IOU check cashed with DeliverMin (with failures).
Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob);

Expand Down Expand Up @@ -840,9 +819,6 @@ class Check_test : public beast::unit_test::suite
{
// Examine the effects of the asfRequireAuth flag.
Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob);
env (fset (gw, asfRequireAuth));
Expand Down Expand Up @@ -900,9 +876,6 @@ class Check_test : public beast::unit_test::suite
allSupported | featureMultiSignReserve})
{
Env env {*this, features};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob);

Expand Down Expand Up @@ -973,9 +946,6 @@ class Check_test : public beast::unit_test::suite
IOU const USD {gw["USD"]};

Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob);

Expand Down Expand Up @@ -1045,9 +1015,6 @@ class Check_test : public beast::unit_test::suite
IOU const USD {gw["USD"]};

Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob);

Expand Down Expand Up @@ -1245,9 +1212,6 @@ class Check_test : public beast::unit_test::suite
IOU const USD {gw["USD"]};

Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob, zoe);

Expand Down Expand Up @@ -1550,10 +1514,6 @@ class Check_test : public beast::unit_test::suite
{
Env env {*this, features};

auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), gw, alice, bob, zoe);

// alice creates her checks ahead of time.
Expand Down Expand Up @@ -1708,9 +1668,6 @@ class Check_test : public beast::unit_test::suite
Account const bob {"bob"};

Env env {*this};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), alice, bob);

Expand Down Expand Up @@ -1745,9 +1702,6 @@ class Check_test : public beast::unit_test::suite
Account const bob {"bob"};

Env env {*this, features};
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

env.fund (XRP(1000), alice, bob);
env.close();
Expand Down
25 changes: 0 additions & 25 deletions src/test/app/CrossingLimits_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ class CrossingLimits_test : public beast::unit_test::suite

using namespace jtx;
Env env(*this, features);
auto const closeTime =
fix1449Time() +
100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

auto const gw = Account("gateway");
auto const USD = gw["USD"];
Expand Down Expand Up @@ -96,10 +92,6 @@ class CrossingLimits_test : public beast::unit_test::suite

using namespace jtx;
Env env(*this, features);
auto const closeTime =
fix1449Time() +
100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

auto const gw = Account("gateway");
auto const USD = gw["USD"];
Expand Down Expand Up @@ -140,10 +132,6 @@ class CrossingLimits_test : public beast::unit_test::suite

using namespace jtx;
Env env(*this, features);
auto const closeTime =
fix1449Time() +
100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

auto const gw = Account("gateway");
auto const USD = gw["USD"];
Expand Down Expand Up @@ -208,10 +196,6 @@ class CrossingLimits_test : public beast::unit_test::suite

using namespace jtx;
Env env(*this, features);
auto const closeTime =
fix1449Time() +
100 * env.closed()->info().closeTimeResolution;
env.close (closeTime);

auto const gw = Account("gateway");
auto const USD = gw["USD"];
Expand Down Expand Up @@ -329,9 +313,6 @@ class CrossingLimits_test : public beast::unit_test::suite
// strand dry until the liquidity is actually used)
{
Env env(*this, features);
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close(closeTime);

env.fund(XRP(100000000), gw, alice, bob, carol);

Expand Down Expand Up @@ -400,9 +381,6 @@ class CrossingLimits_test : public beast::unit_test::suite
}
{
Env env(*this, features);
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close(closeTime);

env.fund(XRP(100000000), gw, alice, bob, carol);

Expand Down Expand Up @@ -508,9 +486,6 @@ class CrossingLimits_test : public beast::unit_test::suite
auto const USD = gw["USD"];

Env env(*this, features);
auto const closeTime =
fix1449Time() + 100 * env.closed()->info().closeTimeResolution;
env.close(closeTime);

env.fund(XRP(100000000), gw, alice, bob);

Expand Down
11 changes: 3 additions & 8 deletions src/test/app/Flow_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1090,16 +1090,12 @@ struct Flow_test : public beast::unit_test::suite
}

void
testRIPD1449(bool withFix)
testRIPD1449()
{
testcase("ripd1449");

using namespace jtx;
Env env(*this);
auto const timeDelta = env.closed ()->info ().closeTimeResolution;
auto const d = withFix ? 100*timeDelta : -100*timeDelta;
auto closeTime = fix1449Time() + d;
env.close(closeTime);

// pay alice -> xrp -> USD/bob -> bob -> gw -> alice
// set no ripple on bob's side of the bob/gw trust line
Expand Down Expand Up @@ -1128,7 +1124,7 @@ struct Flow_test : public beast::unit_test::suite

env(pay(alice, alice, USD(1000)), path(~bob["USD"], bob, gw),
sendmax(XRP(1)), txflags(tfNoRippleDirect),
ter(withFix ? TER {tecPATH_DRY} : TER {tesSUCCESS}));
ter(tecPATH_DRY));
env.close();
}

Expand Down Expand Up @@ -1214,8 +1210,7 @@ struct Flow_test : public beast::unit_test::suite
{
testLimitQuality();
testRIPD1443();
testRIPD1449(true);
testRIPD1449(false);
testRIPD1449();

using namespace jtx;
auto const sa = supported_amendments();
Expand Down
Loading

0 comments on commit ae707b8

Please sign in to comment.