Add [features] section to .cfg:

This non-production config section allows features to be enabled
by listing their text descriptions, one line each, in the config
section titled "features".

NOTE: Feature names with leading or trailing whitespace, or
      containing an equals sign ('=') are not supported.
This commit is contained in:
Vinnie Falco
2015-07-29 07:36:29 -07:00
committed by Edward Hennis
parent 2ec40cb6f1
commit d49f9ea109
11 changed files with 145 additions and 17 deletions

View File

@@ -86,11 +86,15 @@ Rules::Rules (DigestAwareReadView const& ledger)
}
bool
Rules::enabled (uint256 const& feature) const
Rules::enabled (uint256 const& id,
std::unordered_set<uint256,
beast::uhash<>> const& presets) const
{
if (presets.count(id) > 0)
return true;
if (! impl_)
return false;
return impl_->enabled(feature);
return impl_->enabled(id);
}
bool