From 0964379a669aca18ae60ee1abe2a4fe514c28ed5 Mon Sep 17 00:00:00 2001 From: Scott Schurr Date: Wed, 11 Dec 2019 13:25:37 -0800 Subject: [PATCH] Always enable fix1274 dated September 30, 2016 17:00:00 UTC --- src/ripple/ledger/View.h | 3 --- src/ripple/ledger/impl/PaymentSandbox.cpp | 3 +-- src/ripple/ledger/impl/View.cpp | 14 -------------- src/test/app/Flow_test.cpp | 4 +--- src/test/ledger/PaymentSandbox_test.cpp | 4 ---- 5 files changed, 2 insertions(+), 26 deletions(-) diff --git a/src/ripple/ledger/View.h b/src/ripple/ledger/View.h index 2eea28cd8d..8eab51c858 100644 --- a/src/ripple/ledger/View.h +++ b/src/ripple/ledger/View.h @@ -328,9 +328,6 @@ transferXRP (ApplyView& view, STAmount const& amount, beast::Journal j); -[[nodiscard]] NetClock::time_point const& fix1274Time (); -[[nodiscard]] bool fix1274 (NetClock::time_point const closeTime); - [[nodiscard]] NetClock::time_point const& fix1298Time (); [[nodiscard]] bool fix1298 (NetClock::time_point const closeTime); diff --git a/src/ripple/ledger/impl/PaymentSandbox.cpp b/src/ripple/ledger/impl/PaymentSandbox.cpp index 8fec536a31..f2c5781848 100644 --- a/src/ripple/ledger/impl/PaymentSandbox.cpp +++ b/src/ripple/ledger/impl/PaymentSandbox.cpp @@ -204,8 +204,7 @@ PaymentSandbox::balanceHook (AccountID const& account, adjustedAmt = std::min(adjustedAmt, minBal); } - if (fix1274 (info ().parentCloseTime)) - adjustedAmt.setIssuer(amount.getIssuer()); + adjustedAmt.setIssuer(amount.getIssuer()); if (isXRP(issuer) && adjustedAmt < beast::zero) // A calculated negative XRP balance is not an error case. Consider a diff --git a/src/ripple/ledger/impl/View.cpp b/src/ripple/ledger/impl/View.cpp index 3f1e64f908..d742e459db 100644 --- a/src/ripple/ledger/impl/View.cpp +++ b/src/ripple/ledger/impl/View.cpp @@ -33,20 +33,6 @@ namespace ripple { -NetClock::time_point const& fix1274Time () -{ - using namespace std::chrono_literals; - // Fri Sep 30, 2016 17:00:00 UTC - static NetClock::time_point const soTime{528570000s}; - - return soTime; -} - -bool fix1274 (NetClock::time_point const closeTime) -{ - return closeTime > fix1274Time(); -} - NetClock::time_point const& fix1298Time () { using namespace std::chrono_literals; diff --git a/src/test/app/Flow_test.cpp b/src/test/app/Flow_test.cpp index 924801c2e6..d1274d43f5 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -1024,9 +1024,7 @@ struct Flow_test : public beast::unit_test::suite auto const usdC = USD.currency; env.fund(XRP(10000), alice, bob, gw); - // Need to be past this time to see the bug - env.close(fix1274Time() + - 100 * env.closed()->info().closeTimeResolution); + env.close(); env(trust(alice, USD(100))); env.close(); diff --git a/src/test/ledger/PaymentSandbox_test.cpp b/src/test/ledger/PaymentSandbox_test.cpp index cd2b54b097..48a8449978 100644 --- a/src/test/ledger/PaymentSandbox_test.cpp +++ b/src/test/ledger/PaymentSandbox_test.cpp @@ -333,10 +333,6 @@ class PaymentSandbox_test : public beast::unit_test::suite auto const USD = gw["USD"]; Account const alice ("alice"); - auto const closeTime = fix1274Time () + - 100 * env.closed ()->info ().closeTimeResolution; - env.close (closeTime); - ApplyViewImpl av (&*env.current (), tapNONE); PaymentSandbox sb (&av);