mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 18:45:55 +00:00
Remove conditionals for featureTrustSetAuth enabled 19Jul2016
This commit is contained in:
committed by
Manoj doshi
parent
6e4945c56b
commit
51ed7db002
@@ -444,7 +444,7 @@ SetTrust::doApply ()
|
||||
else if (! saLimitAmount && // Setting default limit.
|
||||
(! bQualityIn || ! uQualityIn) && // Not setting quality in or setting default quality in.
|
||||
(! bQualityOut || ! uQualityOut) && // Not setting quality out or setting default quality out.
|
||||
(! (view().rules().enabled(featureTrustSetAuth)) || ! bSetAuth))
|
||||
(! bSetAuth))
|
||||
{
|
||||
JLOG(j_.trace()) <<
|
||||
"Redundant: Setting non-existent ripple line to defaults.";
|
||||
|
||||
@@ -52,7 +52,7 @@ class FeatureCollections
|
||||
{
|
||||
"MultiSign", // Unconditionally supported.
|
||||
"Tickets",
|
||||
"TrustSetAuth",
|
||||
"TrustSetAuth", // Unconditionally supported.
|
||||
"FeeEscalation", // Unconditionally supported.
|
||||
"OwnerPaysFee",
|
||||
"CompareFlowV1V2",
|
||||
@@ -340,7 +340,6 @@ foreachFeature(FeatureBitset bs, F&& f)
|
||||
}
|
||||
|
||||
extern uint256 const featureTickets;
|
||||
extern uint256 const featureTrustSetAuth;
|
||||
extern uint256 const featureOwnerPaysFee;
|
||||
extern uint256 const featureCompareFlowV1V2;
|
||||
extern uint256 const featurePayChan;
|
||||
|
||||
@@ -94,7 +94,7 @@ detail::supportedAmendments ()
|
||||
{
|
||||
"MultiSign", // Unconditionally supported.
|
||||
// "Tickets",
|
||||
"TrustSetAuth",
|
||||
"TrustSetAuth", // Unconditionally supported.
|
||||
"FeeEscalation", // Unconditionally supported.
|
||||
// "OwnerPaysFee",
|
||||
"PayChan",
|
||||
@@ -152,7 +152,6 @@ uint256 bitsetIndexToFeature(size_t i)
|
||||
|
||||
|
||||
uint256 const featureTickets = *getRegisteredFeature("Tickets");
|
||||
uint256 const featureTrustSetAuth = *getRegisteredFeature("TrustSetAuth");
|
||||
uint256 const featureOwnerPaysFee = *getRegisteredFeature("OwnerPaysFee");
|
||||
uint256 const featureCompareFlowV1V2 = *getRegisteredFeature("CompareFlowV1V2");
|
||||
uint256 const featurePayChan = *getRegisteredFeature("PayChan");
|
||||
|
||||
@@ -47,20 +47,11 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
|
||||
void testAuth(FeatureBitset features)
|
||||
{
|
||||
// featureTrustSetAuth should always be reset by the caller.
|
||||
BEAST_EXPECT(!features[featureTrustSetAuth]);
|
||||
|
||||
using namespace jtx;
|
||||
auto const gw = Account("gw");
|
||||
auto const USD = gw["USD"];
|
||||
{
|
||||
Env env(*this, features);
|
||||
env.fund(XRP(100000), "alice", gw);
|
||||
env(fset(gw, asfRequireAuth));
|
||||
env(auth(gw, "alice", "USD"), ter(tecNO_LINE_REDUNDANT));
|
||||
}
|
||||
{
|
||||
Env env(*this, features | featureTrustSetAuth);
|
||||
|
||||
Env env(*this);
|
||||
|
||||
env.fund(XRP(100000), "alice", "bob", gw);
|
||||
env(fset(gw, asfRequireAuth));
|
||||
@@ -74,16 +65,15 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
env(pay(gw, "bob", USD(100)), ter(tecPATH_DRY)); // Should be terNO_AUTH
|
||||
env(pay("alice", "bob", USD(50)), ter(tecPATH_DRY)); // Should be terNO_AUTH
|
||||
}
|
||||
}
|
||||
|
||||
void run() override
|
||||
{
|
||||
using namespace jtx;
|
||||
auto const sa = supported_amendments();
|
||||
testAuth(sa - featureTrustSetAuth - featureFlow - fix1373 - featureFlowCross);
|
||||
testAuth(sa - featureTrustSetAuth - fix1373 - featureFlowCross);
|
||||
testAuth(sa - featureTrustSetAuth - featureFlowCross);
|
||||
testAuth(sa - featureTrustSetAuth);
|
||||
testAuth(sa - featureFlow - fix1373 - featureFlowCross);
|
||||
testAuth(sa - fix1373 - featureFlowCross);
|
||||
testAuth(sa - featureFlowCross);
|
||||
testAuth(sa);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user