20 #include <test/jtx/envconfig.h>
22 #include <ripple/core/ConfigSections.h>
23 #include <test/jtx/amount.h>
57 cfg.
legacy(
"database_path",
"");
59 cfg[
"server"].append(PORT_PEER);
61 cfg[PORT_PEER].set(
"port", port_peer);
62 cfg[PORT_PEER].set(
"protocol",
"peer");
64 cfg[
"server"].append(PORT_RPC);
67 cfg[PORT_RPC].set(
"port", port_rpc);
68 cfg[PORT_RPC].set(
"protocol",
"http,ws2");
70 cfg[
"server"].append(PORT_WS);
73 cfg[PORT_WS].set(
"port", port_ws);
74 cfg[PORT_WS].set(
"protocol",
"ws");
83 (*cfg)[PORT_RPC].set(
"admin",
"");
84 (*cfg)[PORT_WS].set(
"admin",
"");
91 (*cfg)[PORT_RPC].set(
"admin",
"");
92 (*cfg)[PORT_WS].set(
"admin",
"");
100 (*cfg)[PORT_RPC].set(
"admin",
"127.0.0.0/8");
101 (*cfg)[PORT_WS].set(
"admin",
"127.0.0.0/8");
108 (*cfg)[PORT_RPC].set(
"admin",
"");
109 (*cfg)[PORT_WS].set(
"admin",
"");
110 (*cfg)[PORT_RPC].set(
"secure_gateway",
"127.0.0.0/8");
111 (*cfg)[PORT_WS].set(
"secure_gateway",
"127.0.0.0/8");
121 cfg->section(SECTION_VALIDATION_SEED)
129 for (
auto const sectionName : {PORT_PEER, PORT_RPC, PORT_WS})
131 Section& s = (*cfg)[sectionName];
146 (*cfg)[SECTION_PORT_GRPC].set(
"port", port_grpc);
157 (*cfg)[SECTION_PORT_GRPC].set(
"port", port_grpc);
158 (*cfg)[SECTION_PORT_GRPC].set(
"secure_gateway", secureGateway);
Holds a collection of configuration values.
XRPAmount reference_fee
The cost of a reference transaction in drops.
std::unique_ptr< Config > secure_gateway(std::unique_ptr< Config >)
const XRP_t XRP
Converts to XRP Issue or STAmount.
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)
std::unique_ptr< Config > addGrpcConfigWithSecureGateway(std::unique_ptr< Config >, std::string const &secureGateway)
add a grpc address, port and secure_gateway to config
std::unique_ptr< Config > admin_localnet(std::unique_ptr< Config >)
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.
XRPAmount account_reserve
The account reserve requirement in drops.
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.
void set(std::string const &key, std::string const &value)
Set a key/value pair.
XRPAmount owner_reserve
The per-owned item reserve requirement in drops.
std::optional< T > get(std::string const &name) const
std::unique_ptr< Config > secure_gateway_localnet(std::unique_ptr< Config >)
void setupConfigForUnitTests(Config &config)
initializes a config object for use with jtx::Env
static std::string nodeDatabase()