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

@@ -698,7 +698,7 @@ struct Flow_test : public beast::unit_test::suite
Env env (*this, features (fs));
auto const closeTime = amendmentRIPD1141SoTime() +
auto const closeTime = fix1141Time() +
100 * env.closed ()->info ().closeTimeResolution;
env.close (closeTime);
@@ -748,7 +748,7 @@ struct Flow_test : public beast::unit_test::suite
auto const timeDelta = Env{*this}.closed ()->info ().closeTimeResolution;
for(auto const& d: {-timeDelta*100, +timeDelta*100}){
auto const closeTime = amendmentRIPD1141SoTime () + d;
auto const closeTime = fix1141Time () + d;
Env env (*this);
env.close (closeTime);
@@ -760,7 +760,7 @@ struct Flow_test : public beast::unit_test::suite
env (offer (bob, XRP (100), USD (50)));
auto expectedResult =
closeTime < amendmentRIPD1141SoTime () ? tecPATH_DRY : tesSUCCESS;
closeTime < fix1141Time () ? tecPATH_DRY : tesSUCCESS;
env (pay (alice, carol, USD (100)), path (~USD), sendmax (XRP (100)),
txflags (tfNoRippleDirect | tfPartialPayment | tfLimitQuality),
ter (expectedResult));
@@ -812,7 +812,7 @@ struct Flow_test : public beast::unit_test::suite
Env env (*this, features (fs));
auto const closeTime =
amendmentRIPD1141SoTime () + 100 * env.closed ()->info ().closeTimeResolution;
fix1141Time () + 100 * env.closed ()->info ().closeTimeResolution;
env.close (closeTime);
env.fund (XRP (1000000), gw1, gw2);
@@ -886,7 +886,7 @@ struct Flow_test : public beast::unit_test::suite
Env env (*this, features (fs));
auto const closeTime =
amendmentRIPD1141SoTime () + 100 * env.closed ()->info ().closeTimeResolution;
fix1141Time () + 100 * env.closed ()->info ().closeTimeResolution;
env.close (closeTime);
env.fund (XRP (1000000), gw1, gw2);
@@ -954,7 +954,7 @@ struct Flow_test : public beast::unit_test::suite
Env env(*this, features(fs));
// Need new behavior from `accountHolds`
auto const closeTime = amendmentRIPD1141SoTime() +
auto const closeTime = fix1141Time() +
env.closed()->info().closeTimeResolution;
env.close(closeTime);
@@ -983,7 +983,7 @@ struct Flow_test : public beast::unit_test::suite
{
// Test reverse
Env env(*this, features(fs));
auto closeTime = amendmentRIPD1298SoTime();
auto closeTime = fix1298Time();
if (withFix)
closeTime += env.closed()->info().closeTimeResolution;
else
@@ -1015,7 +1015,7 @@ struct Flow_test : public beast::unit_test::suite
{
// Test forward
Env env(*this, features(fs));
auto closeTime = amendmentRIPD1298SoTime();
auto closeTime = fix1298Time();
if (withFix)
closeTime += env.closed()->info().closeTimeResolution;
else
@@ -1064,7 +1064,7 @@ struct Flow_test : public beast::unit_test::suite
env.fund(XRP(10000), alice, bob, gw);
// Need to be past this time to see the bug
env.close(amendmentRIPD1274SoTime() +
env.close(fix1274Time() +
100 * env.closed()->info().closeTimeResolution);
env(trust(alice, USD(100)));
env.close();
@@ -1113,7 +1113,7 @@ struct Flow_test : public beast::unit_test::suite
Env env(*this, features(featureFlow));
auto const timeDelta = env.closed ()->info ().closeTimeResolution;
auto const d = withFix ? timeDelta*100 : -timeDelta*100;
auto closeTime = amendmentRIPD1443SoTime() + d;
auto closeTime = fix1443Time() + d;
env.close(closeTime);
auto const alice = Account("alice");

View File

@@ -647,7 +647,7 @@ struct PayStrand_test : public beast::unit_test::suite
ExistingElementPool eep;
Env env(*this, features(featureToStrandV2));
auto const closeTime = amendmentRIPD1298SoTime() +
auto const closeTime = fix1298Time() +
100 * env.closed()->info().closeTimeResolution;
env.close(closeTime);
eep.setupEnv(env, /*numAcc*/ 9, /*numCur*/ 6, boost::none);

View File

@@ -281,12 +281,12 @@ class PaymentSandbox_test : public beast::unit_test::suite
for (auto timeDelta : {-env.closed ()->info ().closeTimeResolution,
env.closed ()->info ().closeTimeResolution})
{
auto const closeTime = amendmentRIPD1141SoTime () + timeDelta;
auto const closeTime = fix1141Time () + timeDelta;
env.close (closeTime);
ApplyViewImpl av (&*env.current (), tapNONE);
PaymentSandbox pv (&av);
pv.creditHook (gw, alice, hugeAmt, -tinyAmt);
if (closeTime > amendmentRIPD1141SoTime ())
if (closeTime > fix1141Time ())
BEAST_EXPECT(pv.balanceHook (alice, gw, hugeAmt) == tinyAmt);
else
BEAST_EXPECT(pv.balanceHook (alice, gw, hugeAmt) != tinyAmt);
@@ -317,7 +317,7 @@ class PaymentSandbox_test : public beast::unit_test::suite
Account const alice ("alice");
env.fund (reserve(env, 1), alice);
auto const closeTime = amendmentRIPD1141SoTime () +
auto const closeTime = fix1141Time () +
100 * env.closed ()->info ().closeTimeResolution;
env.close (closeTime);
ApplyViewImpl av (&*env.current (), tapNONE);