Rename timebase switches from 'amendment' to 'fix'

This commit is contained in:
seelabs
2017-03-30 17:16:21 -04:00
committed by Nik Bougalis
parent af66c62814
commit 3bd9772c04
10 changed files with 48 additions and 48 deletions

View File

@@ -328,7 +328,7 @@ TER RippleCalc::rippleCalculate (detail::FlowDebugInfo* flowDebugInfo)
boost::container::flat_set<uint256> unfundedOffersFromBestPaths;
int iPass = 0;
auto const dcSwitch = amendmentRIPD1141(view.info().parentCloseTime);
auto const dcSwitch = fix1141(view.info().parentCloseTime);
while (resultCode == temUNCERTAIN)
{

View File

@@ -27,7 +27,7 @@ namespace path {
TER PathCursor::advanceNode (STAmount const& amount, bool reverse, bool callerHasLiquidity) const
{
bool const multi = amendmentRIPD1141 (view ().info ().parentCloseTime)
bool const multi = fix1141 (view ().info ().parentCloseTime)
? (multiQuality_ || (!callerHasLiquidity && amount == zero))
: (multiQuality_ || amount == zero);

View File

@@ -247,7 +247,7 @@ TER PathCursor::deliverNodeReverseImpl (
saInPassAct,
saOutAct > zero);
if (amendmentRIPD1141(view().info().parentCloseTime))
if (fix1141(view().info().parentCloseTime))
{
// The recursive call is dry this time, but we have liquidity
// from previous calls

View File

@@ -418,7 +418,7 @@ BookStep<TIn, TOut>::revImp (
// subtracting them leaves a result of zero. This can cause the check for
// (stpAmt.out > remainingOut) to incorrectly think an offer will be funded
// after subtracting remainingIn.
if (amendmentRIPD1298(sb.parentCloseTime()))
if (fix1298(sb.parentCloseTime()))
return offer.fully_consumed();
else
return false;
@@ -575,7 +575,7 @@ BookStep<TIn, TOut>::fwdImp (
// subtracting them leaves a result of zero. This can cause the check for
// (stpAmt.in > remainingIn) to incorrectly think an offer will be funded
// after subtracting remainingIn.
if (amendmentRIPD1298(sb.parentCloseTime()))
if (fix1298(sb.parentCloseTime()))
processMore = processMore || offer.fully_consumed();
return processMore;
@@ -692,7 +692,7 @@ BookStep<TIn, TOut>::check(StrandContext const& ctx) const
return temBAD_PATH_LOOP;
}
if (amendmentRIPD1443(ctx.view.info().parentCloseTime))
if (fix1443(ctx.view.info().parentCloseTime))
{
if (ctx.prevStep)
{

View File

@@ -335,19 +335,19 @@ transferXRP (ApplyView& view,
STAmount const& amount,
beast::Journal j);
NetClock::time_point const& amendmentRIPD1141SoTime ();
bool amendmentRIPD1141 (NetClock::time_point const closeTime);
NetClock::time_point const& fix1141Time ();
bool fix1141 (NetClock::time_point const closeTime);
NetClock::time_point const& amendmentRIPD1274SoTime ();
bool amendmentRIPD1274 (NetClock::time_point const closeTime);
NetClock::time_point const& fix1274Time ();
bool fix1274 (NetClock::time_point const closeTime);
NetClock::time_point const& amendmentRIPD1298SoTime ();
bool amendmentRIPD1298 (NetClock::time_point const closeTime);
NetClock::time_point const& fix1298Time ();
bool fix1298 (NetClock::time_point const closeTime);
NetClock::time_point const& amendmentRIPD1443SoTime ();
bool amendmentRIPD1443 (NetClock::time_point const closeTime);
NetClock::time_point const& fix1443Time ();
bool fix1443 (NetClock::time_point const closeTime);
NetClock::time_point const& fix1449SoTime ();
NetClock::time_point const& fix1449Time ();
bool fix1449 (NetClock::time_point const closeTime);
} // ripple

View File

@@ -180,7 +180,7 @@ PaymentSandbox::balanceHook (AccountID const& account,
*/
auto const currency = amount.getCurrency ();
auto const switchover = amendmentRIPD1141 (info ().parentCloseTime);
auto const switchover = fix1141 (info ().parentCloseTime);
auto adjustedAmt = amount;
if (switchover)
@@ -207,7 +207,7 @@ PaymentSandbox::balanceHook (AccountID const& account,
// calculates (but always less than the actual balance).
adjustedAmt = std::min(adjustedAmt, minBal);
}
if (amendmentRIPD1274 (info ().parentCloseTime))
if (fix1274 (info ().parentCloseTime))
adjustedAmt.setIssuer(amount.getIssuer());
}
else

View File

@@ -31,7 +31,7 @@
namespace ripple {
NetClock::time_point const& amendmentRIPD1141SoTime ()
NetClock::time_point const& fix1141Time ()
{
using namespace std::chrono_literals;
// Fri July 1, 2016 10:00:00am PDT
@@ -39,12 +39,12 @@ NetClock::time_point const& amendmentRIPD1141SoTime ()
return soTime;
}
bool amendmentRIPD1141 (NetClock::time_point const closeTime)
bool fix1141 (NetClock::time_point const closeTime)
{
return closeTime > amendmentRIPD1141SoTime();
return closeTime > fix1141Time();
}
NetClock::time_point const& amendmentRIPD1274SoTime ()
NetClock::time_point const& fix1274Time ()
{
using namespace std::chrono_literals;
// Fri Sep 30, 2016 10:00:00am PDT
@@ -53,12 +53,12 @@ NetClock::time_point const& amendmentRIPD1274SoTime ()
return soTime;
}
bool amendmentRIPD1274 (NetClock::time_point const closeTime)
bool fix1274 (NetClock::time_point const closeTime)
{
return closeTime > amendmentRIPD1274SoTime();
return closeTime > fix1274Time();
}
NetClock::time_point const& amendmentRIPD1298SoTime ()
NetClock::time_point const& fix1298Time ()
{
using namespace std::chrono_literals;
// Wed Dec 21, 2016 10:00:00am PST
@@ -67,12 +67,12 @@ NetClock::time_point const& amendmentRIPD1298SoTime ()
return soTime;
}
bool amendmentRIPD1298 (NetClock::time_point const closeTime)
bool fix1298 (NetClock::time_point const closeTime)
{
return closeTime > amendmentRIPD1298SoTime();
return closeTime > fix1298Time();
}
NetClock::time_point const& amendmentRIPD1443SoTime ()
NetClock::time_point const& fix1443Time ()
{
using namespace std::chrono_literals;
// Sat Mar 11, 2017 05:00:00pm PST
@@ -81,12 +81,12 @@ NetClock::time_point const& amendmentRIPD1443SoTime ()
return soTime;
}
bool amendmentRIPD1443 (NetClock::time_point const closeTime)
bool fix1443 (NetClock::time_point const closeTime)
{
return closeTime > amendmentRIPD1443SoTime();
return closeTime > fix1443Time();
}
NetClock::time_point const& fix1449SoTime ()
NetClock::time_point const& fix1449Time ()
{
using namespace std::chrono_literals;
// Thurs, Mar 30, 2017 01:00:00pm PDT
@@ -97,7 +97,7 @@ NetClock::time_point const& fix1449SoTime ()
bool fix1449 (NetClock::time_point const closeTime)
{
return closeTime > fix1449SoTime();
return closeTime > fix1449Time();
}
// VFALCO NOTE A copy of the other one for now
@@ -177,7 +177,7 @@ accountHolds (ReadView const& view,
if (isXRP(currency))
{
// XRP: return balance minus reserve
if (amendmentRIPD1141 (view.info ().parentCloseTime))
if (fix1141 (view.info ().parentCloseTime))
{
auto const sle = view.read(
keylet::account(account));
@@ -1456,7 +1456,7 @@ rippleSend (ApplyView& view,
// Calculate the amount to transfer accounting
// for any transfer fees:
if (!amendmentRIPD1141 (view.info ().parentCloseTime))
if (!fix1141 (view.info ().parentCloseTime))
{
STAmount const saTransitFee = rippleTransferFee (
view, uSenderID, uReceiverID, issuer, saAmount, j);
@@ -1508,7 +1508,7 @@ accountSend (ApplyView& view,
return rippleSend (view, uSenderID, uReceiverID, saAmount, saActual, j);
}
auto const fv2Switch = amendmentRIPD1141 (view.info ().parentCloseTime);
auto const fv2Switch = fix1141 (view.info ().parentCloseTime);
if (!fv2Switch)
{
auto const dummyBalance = saAmount.zeroed();