Remove conditionals for fix1368 enabled 31Mar2017

This commit is contained in:
Scott Schurr
2020-02-27 14:12:13 -08:00
parent 3e870866e0
commit e93a44fe9b
4 changed files with 8 additions and 13 deletions

View File

@@ -180,7 +180,6 @@ PaymentSandbox::balanceHook (AccountID const& account,
auto const currency = amount.getCurrency ();
auto adjustedAmt = amount;
auto delta = amount.zeroed ();
auto lastBal = amount;
auto minBal = amount;
@@ -194,16 +193,12 @@ PaymentSandbox::balanceHook (AccountID const& account,
minBal = lastBal;
}
}
adjustedAmt = std::min(amount, lastBal - delta);
if (rules().enabled(fix1368))
{
// The adjusted amount should never be larger than the balance. In
// some circumstances, it is possible for the deferred credits table
// to compute usable balance just slightly above what the ledger
// calculates (but always less than the actual balance).
adjustedAmt = std::min(adjustedAmt, minBal);
}
// The adjusted amount should never be larger than the balance. In
// some circumstances, it is possible for the deferred credits table
// to compute usable balance just slightly above what the ledger
// calculates (but always less than the actual balance).
auto adjustedAmt = std::min({amount, lastBal - delta, minBal});
adjustedAmt.setIssuer(amount.getIssuer());
if (isXRP(issuer) && adjustedAmt < beast::zero)

View File

@@ -371,7 +371,7 @@ extern uint256 const featureCompareTakerFlowCross;
extern uint256 const featureFlowCross;
extern uint256 const retiredCryptoConditions;
extern uint256 const retiredTickSize;
extern uint256 const fix1368;
extern uint256 const retiredFix1368;
extern uint256 const featureEscrow;
extern uint256 const featureCryptoConditionsSuite;
extern uint256 const fix1373;

View File

@@ -162,7 +162,7 @@ uint256 const featureCompareTakerFlowCross = *getRegisteredFeature("CompareTaker
uint256 const featureFlowCross = *getRegisteredFeature("FlowCross");
uint256 const retiredCryptoConditions = *getRegisteredFeature("CryptoConditions");
uint256 const retiredTickSize = *getRegisteredFeature("TickSize");
uint256 const fix1368 = *getRegisteredFeature("fix1368");
uint256 const retiredFix1368 = *getRegisteredFeature("fix1368");
uint256 const featureEscrow = *getRegisteredFeature("Escrow");
uint256 const featureCryptoConditionsSuite = *getRegisteredFeature("CryptoConditionsSuite");
uint256 const fix1373 = *getRegisteredFeature("fix1373");

View File

@@ -1291,7 +1291,7 @@ struct Flow_test : public beast::unit_test::suite
testSelfFundedXRPEndpoint(false, features);
testSelfFundedXRPEndpoint(true, features);
testUnfundedOffer(features);
testReexecuteDirectStep(features | fix1368);
testReexecuteDirectStep(features);
testSelfPayLowQualityOffer(features);
}