Always enable fix1274 dated September 30, 2016 17:00:00 UTC

This commit is contained in:
Scott Schurr
2019-12-11 13:25:37 -08:00
committed by Manoj doshi
parent a176f58a92
commit 0964379a66
5 changed files with 2 additions and 26 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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;

View File

@@ -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();

View File

@@ -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);