diff --git a/src/ripple/ledger/View.h b/src/ripple/ledger/View.h index 7e225f488..94c848462 100644 --- a/src/ripple/ledger/View.h +++ b/src/ripple/ledger/View.h @@ -341,6 +341,12 @@ bool amendmentRIPD1141 (NetClock::time_point const closeTime); NetClock::time_point const& amendmentRIPD1141SoTime (); bool amendmentRIPD1141 (NetClock::time_point const closeTime); +NetClock::time_point const& amendmentRIPD1274SoTime (); +bool amendmentRIPD1274 (NetClock::time_point const closeTime); + +NetClock::time_point const& amendmentRIPD1274SoTime (); +bool amendmentRIPD1274 (NetClock::time_point const closeTime); + } // ripple diff --git a/src/ripple/ledger/impl/PaymentSandbox.cpp b/src/ripple/ledger/impl/PaymentSandbox.cpp index 0aae98d7e..d686f0af4 100644 --- a/src/ripple/ledger/impl/PaymentSandbox.cpp +++ b/src/ripple/ledger/impl/PaymentSandbox.cpp @@ -195,6 +195,8 @@ PaymentSandbox::balanceHook (AccountID const& account, } } adjustedAmt = std::min(amount, lastBal - delta); + if (amendmentRIPD1274 (info ().parentCloseTime)) + adjustedAmt.setIssuer(amount.getIssuer()); } else { diff --git a/src/ripple/ledger/impl/View.cpp b/src/ripple/ledger/impl/View.cpp index 3cbea894a..8fa8c2a69 100644 --- a/src/ripple/ledger/impl/View.cpp +++ b/src/ripple/ledger/impl/View.cpp @@ -44,6 +44,19 @@ bool amendmentRIPD1141 (NetClock::time_point const closeTime) return closeTime > amendmentRIPD1141SoTime(); } +NetClock::time_point const& amendmentRIPD1274SoTime () +{ + using namespace std::chrono_literals; + // Fri Aug 26, 2016 10:00:00am PDT + static NetClock::time_point const soTime{525546000s}; + return soTime; +} + +bool amendmentRIPD1274 (NetClock::time_point const closeTime) +{ + return closeTime > amendmentRIPD1274SoTime(); +} + // VFALCO NOTE A copy of the other one for now /** Maximum number of entries in a directory page A change would be protocol-breaking.