20 #include <ripple/core/ConfigSections.h>
21 #include <test/jtx/Env.h>
22 #include <test/jtx/envconfig.h>
46 cfg.
legacy(
"database_path",
"");
48 cfg[
"server"].append(
"port_peer");
50 cfg[
"port_peer"].set(
"port", port_peer);
51 cfg[
"port_peer"].set(
"protocol",
"peer");
53 cfg[
"server"].append(
"port_rpc");
56 cfg[
"port_rpc"].set(
"port", port_rpc);
57 cfg[
"port_rpc"].set(
"protocol",
"http,ws2");
59 cfg[
"server"].append(
"port_ws");
62 cfg[
"port_ws"].set(
"port", port_ws);
63 cfg[
"port_ws"].set(
"protocol",
"ws");
72 (*cfg)[
"port_rpc"].set(
"admin",
"");
73 (*cfg)[
"port_ws"].set(
"admin",
"");
80 (*cfg)[
"port_rpc"].set(
"admin",
"");
81 (*cfg)[
"port_ws"].set(
"admin",
"");
92 cfg->section(SECTION_VALIDATION_SEED)
100 for (
auto const sectionName : {
"port_peer",
"port_rpc",
"port_ws"})
102 Section& s = (*cfg)[sectionName];
117 (*cfg)[
"port_grpc"].set(
"port", port_grpc);
Holds a collection of configuration values.
std::unique_ptr< Config > secure_gateway(std::unique_ptr< Config >)
std::unique_ptr< Config > validator(std::unique_ptr< Config >, std::string const &)
adjust configuration with params needed to be a validator
std::unique_ptr< Config > addGrpcConfig(std::unique_ptr< Config >)
add a grpc address and port to config
static std::string importNodeDatabase()
std::unique_ptr< Config > port_increment(std::unique_ptr< Config >, int)
adjust the default configured server ports by a specified value
void setupControl(bool bQuiet, bool bSilent, bool bStandalone)
const char * getEnvLocalhostAddr()
std::unique_ptr< Config > no_admin(std::unique_ptr< Config >)
adjust config so no admin ports are enabled
void deprecatedClearSection(std::string const §ion)
Remove all the key/value pairs from the section.
constexpr auto defaultseed
void legacy(std::string const §ion, std::string value)
Set a value that is not a key/value pair.
void overwrite(std::string const §ion, std::string const &key, std::string const &value)
Overwrite a key/value pair with a command line argument If the section does not exist it is created.
std::atomic< bool > envUseIPv4
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::optional< T > get(std::string const &name) const
void set(std::string const &key, std::string const &value)
Set a key/value pair.
void setupConfigForUnitTests(Config &config)
initializes a config object for use with jtx::Env
static std::string nodeDatabase()