mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove conditionals for featureEscrow enabled 31Mar2017
This commit is contained in:
@@ -748,23 +748,23 @@ public:
|
||||
|
||||
{
|
||||
// a Env FeatureBitset has *only* those features
|
||||
Env env{*this, FeatureBitset(featureEscrow, featureFlow)};
|
||||
Env env{*this, FeatureBitset(featureMultiSignReserve, featureFlow)};
|
||||
BEAST_EXPECT(env.app().config().features.size() == 2);
|
||||
foreachFeature(supported, [&](uint256 const& f) {
|
||||
bool const has = (f == featureEscrow || f == featureFlow);
|
||||
bool const has = (f == featureMultiSignReserve || f == featureFlow);
|
||||
this->BEAST_EXPECT(has == hasFeature(env, f));
|
||||
});
|
||||
}
|
||||
|
||||
auto const noFlowOrEscrow =
|
||||
supported_amendments() - featureEscrow - featureFlow;
|
||||
auto const missingSomeFeatures =
|
||||
supported_amendments() - featureMultiSignReserve - featureFlow;
|
||||
{
|
||||
// a Env supported_features_except is missing *only* those features
|
||||
Env env{*this, noFlowOrEscrow};
|
||||
Env env{*this, missingSomeFeatures};
|
||||
BEAST_EXPECT(
|
||||
env.app().config().features.size() == (supported.count() - 2));
|
||||
foreachFeature(supported, [&](uint256 const& f) {
|
||||
bool hasnot = (f == featureEscrow || f == featureFlow);
|
||||
bool hasnot = (f == featureMultiSignReserve || f == featureFlow);
|
||||
this->BEAST_EXPECT(hasnot != hasFeature(env, f));
|
||||
});
|
||||
}
|
||||
@@ -776,7 +776,8 @@ public:
|
||||
// the two supported ones
|
||||
Env env{
|
||||
*this,
|
||||
FeatureBitset(featureEscrow, featureFlow, *neverSupportedFeat)};
|
||||
FeatureBitset(
|
||||
featureMultiSignReserve, featureFlow, *neverSupportedFeat)};
|
||||
|
||||
// this app will have just 2 supported amendments and
|
||||
// one additional never supported feature flag
|
||||
@@ -784,7 +785,7 @@ public:
|
||||
BEAST_EXPECT(hasFeature(env, *neverSupportedFeat));
|
||||
|
||||
foreachFeature(supported, [&](uint256 const& f) {
|
||||
bool has = (f == featureEscrow || f == featureFlow);
|
||||
bool has = (f == featureMultiSignReserve || f == featureFlow);
|
||||
this->BEAST_EXPECT(has == hasFeature(env, f));
|
||||
});
|
||||
}
|
||||
@@ -794,7 +795,7 @@ public:
|
||||
// and omit a few standard amendments
|
||||
// the unsupported features should be enabled
|
||||
Env env{*this,
|
||||
noFlowOrEscrow | FeatureBitset{*neverSupportedFeat}};
|
||||
missingSomeFeatures | FeatureBitset{*neverSupportedFeat}};
|
||||
|
||||
// this app will have all supported amendments minus 2 and then the
|
||||
// one additional never supported feature flag
|
||||
@@ -803,7 +804,7 @@ public:
|
||||
(supported.count() - 2 + 1));
|
||||
BEAST_EXPECT(hasFeature(env, *neverSupportedFeat));
|
||||
foreachFeature(supported, [&](uint256 const& f) {
|
||||
bool hasnot = (f == featureEscrow || f == featureFlow);
|
||||
bool hasnot = (f == featureMultiSignReserve || f == featureFlow);
|
||||
this->BEAST_EXPECT(hasnot != hasFeature(env, f));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user