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

@@ -21,6 +21,7 @@
#define RIPPLE_CORE_CONFIG_H_INCLUDED
#include <ripple/basics/BasicConfig.h>
#include <ripple/basics/base_uint.h>
#include <ripple/protocol/SystemParameters.h>
#include <ripple/protocol/RippleAddress.h>
#include <ripple/json/json_value.h>
@@ -36,6 +37,7 @@
#include <map>
#include <string>
#include <type_traits>
#include <unordered_set>
#include <vector>
namespace ripple {
@@ -53,6 +55,8 @@ countSectionEntries (IniFileSections& secSource, std::string const& strSection);
IniFileSections::mapped_type*
getIniFileSection (IniFileSections& secSource, std::string const& strSection);
class Rules;
//------------------------------------------------------------------------------
enum SizedItemName
@@ -257,6 +261,8 @@ public:
boost::optional<boost::asio::ip::address_v4> rpc_ip;
boost::optional<std::uint16_t> rpc_port;
std::unordered_set<uint256, beast::uhash<>> features;
public:
Config ();