mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 13:05:53 +00:00
Remove conditionals for fix1368 enabled 31Mar2017
This commit is contained in:
@@ -180,7 +180,6 @@ PaymentSandbox::balanceHook (AccountID const& account,
|
|||||||
|
|
||||||
auto const currency = amount.getCurrency ();
|
auto const currency = amount.getCurrency ();
|
||||||
|
|
||||||
auto adjustedAmt = amount;
|
|
||||||
auto delta = amount.zeroed ();
|
auto delta = amount.zeroed ();
|
||||||
auto lastBal = amount;
|
auto lastBal = amount;
|
||||||
auto minBal = amount;
|
auto minBal = amount;
|
||||||
@@ -194,16 +193,12 @@ PaymentSandbox::balanceHook (AccountID const& account,
|
|||||||
minBal = lastBal;
|
minBal = lastBal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
adjustedAmt = std::min(amount, lastBal - delta);
|
|
||||||
if (rules().enabled(fix1368))
|
|
||||||
{
|
|
||||||
// The adjusted amount should never be larger than the balance. In
|
// The adjusted amount should never be larger than the balance. In
|
||||||
// some circumstances, it is possible for the deferred credits table
|
// some circumstances, it is possible for the deferred credits table
|
||||||
// to compute usable balance just slightly above what the ledger
|
// to compute usable balance just slightly above what the ledger
|
||||||
// calculates (but always less than the actual balance).
|
// calculates (but always less than the actual balance).
|
||||||
adjustedAmt = std::min(adjustedAmt, minBal);
|
auto adjustedAmt = std::min({amount, lastBal - delta, minBal});
|
||||||
}
|
|
||||||
|
|
||||||
adjustedAmt.setIssuer(amount.getIssuer());
|
adjustedAmt.setIssuer(amount.getIssuer());
|
||||||
|
|
||||||
if (isXRP(issuer) && adjustedAmt < beast::zero)
|
if (isXRP(issuer) && adjustedAmt < beast::zero)
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ extern uint256 const featureCompareTakerFlowCross;
|
|||||||
extern uint256 const featureFlowCross;
|
extern uint256 const featureFlowCross;
|
||||||
extern uint256 const retiredCryptoConditions;
|
extern uint256 const retiredCryptoConditions;
|
||||||
extern uint256 const retiredTickSize;
|
extern uint256 const retiredTickSize;
|
||||||
extern uint256 const fix1368;
|
extern uint256 const retiredFix1368;
|
||||||
extern uint256 const featureEscrow;
|
extern uint256 const featureEscrow;
|
||||||
extern uint256 const featureCryptoConditionsSuite;
|
extern uint256 const featureCryptoConditionsSuite;
|
||||||
extern uint256 const fix1373;
|
extern uint256 const fix1373;
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ uint256 const featureCompareTakerFlowCross = *getRegisteredFeature("CompareTaker
|
|||||||
uint256 const featureFlowCross = *getRegisteredFeature("FlowCross");
|
uint256 const featureFlowCross = *getRegisteredFeature("FlowCross");
|
||||||
uint256 const retiredCryptoConditions = *getRegisteredFeature("CryptoConditions");
|
uint256 const retiredCryptoConditions = *getRegisteredFeature("CryptoConditions");
|
||||||
uint256 const retiredTickSize = *getRegisteredFeature("TickSize");
|
uint256 const retiredTickSize = *getRegisteredFeature("TickSize");
|
||||||
uint256 const fix1368 = *getRegisteredFeature("fix1368");
|
uint256 const retiredFix1368 = *getRegisteredFeature("fix1368");
|
||||||
uint256 const featureEscrow = *getRegisteredFeature("Escrow");
|
uint256 const featureEscrow = *getRegisteredFeature("Escrow");
|
||||||
uint256 const featureCryptoConditionsSuite = *getRegisteredFeature("CryptoConditionsSuite");
|
uint256 const featureCryptoConditionsSuite = *getRegisteredFeature("CryptoConditionsSuite");
|
||||||
uint256 const fix1373 = *getRegisteredFeature("fix1373");
|
uint256 const fix1373 = *getRegisteredFeature("fix1373");
|
||||||
|
|||||||
@@ -1291,7 +1291,7 @@ struct Flow_test : public beast::unit_test::suite
|
|||||||
testSelfFundedXRPEndpoint(false, features);
|
testSelfFundedXRPEndpoint(false, features);
|
||||||
testSelfFundedXRPEndpoint(true, features);
|
testSelfFundedXRPEndpoint(true, features);
|
||||||
testUnfundedOffer(features);
|
testUnfundedOffer(features);
|
||||||
testReexecuteDirectStep(features | fix1368);
|
testReexecuteDirectStep(features);
|
||||||
testSelfPayLowQualityOffer(features);
|
testSelfPayLowQualityOffer(features);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user