20 #include <test/jtx/envconfig.h>
22 #include <ripple/core/ConfigSections.h>
23 #include <test/jtx/Env.h>
24 #include <test/jtx/amount.h>
55 cfg.
legacy(
"database_path",
"");
57 cfg[
"server"].append(
"port_peer");
59 cfg[
"port_peer"].set(
"port", port_peer);
60 cfg[
"port_peer"].set(
"protocol",
"peer");
62 cfg[
"server"].append(
"port_rpc");
65 cfg[
"port_rpc"].set(
"port", port_rpc);
66 cfg[
"port_rpc"].set(
"protocol",
"http,ws2");
68 cfg[
"server"].append(
"port_ws");
71 cfg[
"port_ws"].set(
"port", port_ws);
72 cfg[
"port_ws"].set(
"protocol",
"ws");
81 (*cfg)[
"port_rpc"].set(
"admin",
"");
82 (*cfg)[
"port_ws"].set(
"admin",
"");
89 (*cfg)[
"port_rpc"].set(
"admin",
"");
90 (*cfg)[
"port_ws"].set(
"admin",
"");
98 (*cfg)[
"port_rpc"].set(
"admin",
"127.0.0.0/8");
99 (*cfg)[
"port_ws"].set(
"admin",
"127.0.0.0/8");
106 (*cfg)[
"port_rpc"].set(
"admin",
"");
107 (*cfg)[
"port_ws"].set(
"admin",
"");
108 (*cfg)[
"port_rpc"].set(
"secure_gateway",
"127.0.0.0/8");
109 (*cfg)[
"port_ws"].set(
"secure_gateway",
"127.0.0.0/8");
119 cfg->section(SECTION_VALIDATION_SEED)
127 for (
auto const sectionName : {
"port_peer",
"port_rpc",
"port_ws"})
129 Section& s = (*cfg)[sectionName];
144 (*cfg)[
"port_grpc"].set(
"port", port_grpc);
155 (*cfg)[
"port_grpc"].set(
"port", port_grpc);
156 (*cfg)[
"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()