|
xrpld
|
#include <Config.h>


Public Member Functions | |
| std::filesystem::path | getDebugLogFile () const |
| Returns the full path and filename of the debug log file. | |
| Config () | |
| void | setup (std::string const &strConf, bool bQuiet, bool bSilent, bool bStandalone) |
| Set up the configuration and determine the config and data directories. | |
| void | setupControl (bool bQuiet, bool bSilent, bool bStandalone) |
| void | loadFromString (std::string const &fileContents) |
| Load the config from the contents of the string. | |
| bool | quiet () const |
| bool | silent () const |
| bool | standalone () const |
| bool | useTxTables () const |
| bool | canSign () const |
| int | getValueFor (SizedItem item, std::optional< std::size_t > node=std::nullopt) const |
| Retrieve the default value for the item at the specified node size. | |
| beast::Journal | journal () const |
| bool | exists (std::string const &name) const |
| Returns true if a section with the given name exists. | |
| 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. | |
| void | deprecatedClearSection (std::string const §ion) |
| Remove all the key/value pairs from the section. | |
| void | legacy (std::string const §ion, std::string value) |
| Set a value that is not a key/value pair. | |
| std::string | legacy (std::string const §ionName) const |
| Get the legacy value of a section. | |
| bool | hadTrailingComments () const |
| Section & | section (std::string const &name) |
| Returns the section with the given name. | |
| Section const & | section (std::string const &name) const |
| Section const & | operator[] (std::string const &name) const |
| Section & | operator[] (std::string const &name) |
Static Public Attributes | |
| static constexpr std::string_view | kConfigFileName = "xrpld.cfg" |
| static constexpr std::string_view | kConfigLegacyName = "rippled.cfg" |
| static constexpr std::string_view | kDatabaseDirName = "db" |
| static constexpr std::string_view | kValidatorsFileName = "validators.txt" |
| static constexpr int | kMaxJobQueueTx = 1000 |
| static constexpr int | kMinJobQueueTx = 100 |
| static constexpr std::size_t | kMinManifestCount = 50 |
| static constexpr std::size_t | kMaxManifestCount = 1000 |
Protected Member Functions | |
| void | build (IniFileSections const &ifs) |
Private Member Functions | |
| void | load () |
Private Attributes | |
| std::filesystem::path | configFile_ |
| std::filesystem::path | debugLogfile_ |
| beast::Journal const | j_ |
| bool | quiet_ = false |
| bool | silent_ = false |
| bool | runStandalone_ = false |
| Operate in stand-alone mode. | |
| bool | useTxTables_ = true |
| bool | signingEnabled_ = false |
| Determines if the server will sign a tx, given an account's secret seed. | |
| std::uint64_t const | ramSize_ |
| std::unordered_map< std::string, Section > | map_ |
Definition at line 104 of file src/xrpld/core/Config.h.
| xrpl::Config::Config | ( | ) |
Definition at line 329 of file xrpld/core/detail/Config.cpp.
|
nodiscard |
Returns the full path and filename of the debug log file.
Definition at line 1222 of file xrpld/core/detail/Config.cpp.
|
private |
Definition at line 483 of file xrpld/core/detail/Config.cpp.
| void xrpl::Config::setup | ( | std::string const & | strConf, |
| bool | bQuiet, | ||
| bool | bSilent, | ||
| bool | bStandalone ) |
Set up the configuration and determine the config and data directories.
When no config file is named, searches the working directory, then the XDG config directory when HOME is set, then the system config directory, and takes the first holding a config file under either name. The system config directory is the default when none does.
Be very careful to make sure these bool params are in the right order.
| strConf | Path of the config file, or empty to search for it. |
| bQuiet | Whether to minimize logging verbosity. |
| bSilent | Whether to write no console output after startup. |
| bStandalone | Whether to operate in stand-alone mode. |
Definition at line 370 of file xrpld/core/detail/Config.cpp.
| void xrpl::Config::setupControl | ( | bool | bQuiet, |
| bool | bSilent, | ||
| bool | bStandalone ) |
Definition at line 335 of file xrpld/core/detail/Config.cpp.
| void xrpl::Config::loadFromString | ( | std::string const & | fileContents | ) |
Load the config from the contents of the string.
| fileContents | String representing the config contents. |
////////////////// !!TEMPORARY CODE BLOCK!! ////////////////////////
////////////// !!END OF TEMPORARY CODE BLOCK!! /////////////////////
////////////////// !!TEMPORARY CODE BLOCK!! ///////////////////////
////////////// !!END OF TEMPORARY CODE BLOCK!! /////////////////////
Definition at line 506 of file xrpld/core/detail/Config.cpp.
|
nodiscard |
Definition at line 379 of file src/xrpld/core/Config.h.
|
nodiscard |
Definition at line 384 of file src/xrpld/core/Config.h.
|
nodiscard |
Definition at line 389 of file src/xrpld/core/Config.h.
|
nodiscard |
Definition at line 395 of file src/xrpld/core/Config.h.
|
nodiscard |
Definition at line 401 of file src/xrpld/core/Config.h.
|
nodiscard |
Retrieve the default value for the item at the specified node size.
| item | The item for which the default value is needed |
| node | Optional value, used to adjust the result to match the size of a node (0: tiny, ..., 4: huge). If unseated, uses the configured size (NODE_SIZE). |
| This | method can throw std::out_of_range if you ask for values that it does not recognize or request a non-default node-size. |
Definition at line 1256 of file xrpld/core/detail/Config.cpp.
|
nodiscard |
Definition at line 428 of file src/xrpld/core/Config.h.
|
nodiscardinherited |
Returns true if a section with the given name exists.
Definition at line 115 of file BasicConfig.cpp.
|
inherited |
Returns the section with the given name.
If the section does not exist, an empty section is returned.
Definition at line 121 of file BasicConfig.cpp.
|
nodiscardinherited |
Definition at line 127 of file BasicConfig.cpp.
|
inherited |
Definition at line 245 of file BasicConfig.h.
|
inherited |
Definition at line 251 of file BasicConfig.h.
|
inherited |
Overwrite a key/value pair with a command line argument If the section does not exist it is created.
The previous value, if any, is overwritten.
Definition at line 137 of file BasicConfig.cpp.
|
inherited |
Remove all the key/value pairs from the section.
Definition at line 145 of file BasicConfig.cpp.
|
inherited |
Set a value that is not a key/value pair.
The value is stored as the section's first value and may be retrieved through section::legacy.
| section | Name of the section to modify. |
| value | Contents of the legacy value. |
Definition at line 153 of file BasicConfig.cpp.
|
nodiscardinherited |
Get the legacy value of a section.
A section with a single-line value may be retrieved as a legacy value.
| sectionName | Retrieve the contents of this section's legacy value. |
Definition at line 159 of file BasicConfig.cpp.
|
nodiscardinherited |
Definition at line 300 of file BasicConfig.h.
|
protectedinherited |
Definition at line 165 of file BasicConfig.cpp.
|
staticconstexpr |
Definition at line 108 of file src/xrpld/core/Config.h.
|
staticconstexpr |
Definition at line 109 of file src/xrpld/core/Config.h.
|
staticconstexpr |
Definition at line 110 of file src/xrpld/core/Config.h.
|
staticconstexpr |
Definition at line 111 of file src/xrpld/core/Config.h.
|
private |
Definition at line 120 of file src/xrpld/core/Config.h.
| std::filesystem::path xrpl::Config::configDir |
Definition at line 123 of file src/xrpld/core/Config.h.
|
private |
Definition at line 126 of file src/xrpld/core/Config.h.
|
private |
Definition at line 130 of file src/xrpld/core/Config.h.
|
private |
Definition at line 132 of file src/xrpld/core/Config.h.
|
private |
Definition at line 133 of file src/xrpld/core/Config.h.
|
private |
Operate in stand-alone mode.
In stand alone mode:
Definition at line 144 of file src/xrpld/core/Config.h.
|
private |
Definition at line 146 of file src/xrpld/core/Config.h.
|
private |
Determines if the server will sign a tx, given an account's secret seed.
In the past, this was allowed, but this functionality can have security implications. The new default is to not allow this functionality, but a config option is included to enable this.
Definition at line 155 of file src/xrpld/core/Config.h.
|
private |
Definition at line 158 of file src/xrpld/core/Config.h.
| bool xrpl::Config::doImport = false |
Definition at line 161 of file src/xrpld/core/Config.h.
| bool xrpl::Config::elbSupport = false |
Definition at line 162 of file src/xrpld/core/Config.h.
| std::vector<std::string> xrpl::Config::ips |
Definition at line 165 of file src/xrpld/core/Config.h.
| std::vector<std::string> xrpl::Config::ipsFixed |
Definition at line 168 of file src/xrpld/core/Config.h.
| StartUpType xrpl::Config::startUp = StartUpType::Normal |
Definition at line 170 of file src/xrpld/core/Config.h.
| bool xrpl::Config::startValid = false |
Definition at line 172 of file src/xrpld/core/Config.h.
| std::string xrpl::Config::startLedger |
Definition at line 174 of file src/xrpld/core/Config.h.
| std::optional<UInt256> xrpl::Config::trapTxHash |
Definition at line 176 of file src/xrpld/core/Config.h.
| uint32_t xrpl::Config::networkId = 0 |
Definition at line 179 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::networkQuorum = 1 |
Definition at line 183 of file src/xrpld/core/Config.h.
| int xrpl::Config::relayUntrustedValidations = 1 |
Definition at line 188 of file src/xrpld/core/Config.h.
| int xrpl::Config::relayUntrustedProposals = 0 |
Definition at line 189 of file src/xrpld/core/Config.h.
| bool xrpl::Config::peerPrivate = false |
Definition at line 192 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::peersMax = 0 |
Definition at line 198 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::peersOutMax = 0 |
Definition at line 199 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::peersInMax = 0 |
Definition at line 200 of file src/xrpld/core/Config.h.
| int xrpl::Config::pathSearchOld = 2 |
Definition at line 214 of file src/xrpld/core/Config.h.
| int xrpl::Config::pathSearch = 2 |
Definition at line 215 of file src/xrpld/core/Config.h.
| int xrpl::Config::pathSearchFast = 2 |
Definition at line 216 of file src/xrpld/core/Config.h.
| int xrpl::Config::pathSearchMax = 3 |
Definition at line 217 of file src/xrpld/core/Config.h.
| std::optional<std::size_t> xrpl::Config::validationQuorum |
Definition at line 220 of file src/xrpld/core/Config.h.
| FeeSetup xrpl::Config::fees |
Definition at line 222 of file src/xrpld/core/Config.h.
| std::uint32_t xrpl::Config::ledgerHistory = 256 |
Definition at line 225 of file src/xrpld/core/Config.h.
| std::uint32_t xrpl::Config::fetchDepth = 1000000000 |
Definition at line 226 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::nodeSize = 0 |
Definition at line 231 of file src/xrpld/core/Config.h.
| bool xrpl::Config::sslVerify = true |
Definition at line 233 of file src/xrpld/core/Config.h.
| std::string xrpl::Config::sslVerifyFile |
Definition at line 234 of file src/xrpld/core/Config.h.
| std::string xrpl::Config::sslVerifyDir |
Definition at line 235 of file src/xrpld/core/Config.h.
| bool xrpl::Config::compression = false |
Definition at line 238 of file src/xrpld/core/Config.h.
| bool xrpl::Config::ledgerReplay = false |
Definition at line 241 of file src/xrpld/core/Config.h.
| int xrpl::Config::maxTransactions = 250 |
Definition at line 244 of file src/xrpld/core/Config.h.
|
staticconstexpr |
Definition at line 245 of file src/xrpld/core/Config.h.
|
staticconstexpr |
Definition at line 246 of file src/xrpld/core/Config.h.
| std::optional<std::size_t> xrpl::Config::maxSubscriptionsPerConnection |
Definition at line 252 of file src/xrpld/core/Config.h.
| std::chrono::seconds xrpl::Config::amendmentMajorityTime = kDefaultAmendmentMajorityTime |
Definition at line 255 of file src/xrpld/core/Config.h.
| int xrpl::Config::workers = 0 |
Definition at line 258 of file src/xrpld/core/Config.h.
| int xrpl::Config::ioWorkers = 0 |
Definition at line 259 of file src/xrpld/core/Config.h.
| int xrpl::Config::prefetchWorkers = 0 |
Definition at line 260 of file src/xrpld/core/Config.h.
| bool xrpl::Config::forceMultiThread = false |
Definition at line 263 of file src/xrpld/core/Config.h.
| std::optional<int> xrpl::Config::sweepInterval |
Definition at line 267 of file src/xrpld/core/Config.h.
| bool xrpl::Config::vpReduceRelayBaseSquelchEnable = false |
Definition at line 272 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::vpReduceRelaySquelchMaxSelectedPeers = 5 |
////////////////// !
!TEMPORARY CODE BLOCK!! ////////////////////////
Definition at line 280 of file src/xrpld/core/Config.h.
| bool xrpl::Config::txReduceRelayEnable = false |
////////////// END OF TEMPORARY CODE BLOCK /////////////////////
Definition at line 286 of file src/xrpld/core/Config.h.
| bool xrpl::Config::txReduceRelayMetrics = false |
Definition at line 293 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::txReduceRelayMinPeers = 20 |
Definition at line 296 of file src/xrpld/core/Config.h.
| std::size_t xrpl::Config::txRelayPercentage = 25 |
Definition at line 299 of file src/xrpld/core/Config.h.
| std::optional<beast::ip::Endpoint> xrpl::Config::rpcIp |
Definition at line 302 of file src/xrpld/core/Config.h.
| std::unordered_set<UInt256, beast::Uhash<> > xrpl::Config::features |
Definition at line 304 of file src/xrpld/core/Config.h.
| std::string xrpl::Config::serverDomain |
Definition at line 306 of file src/xrpld/core/Config.h.
| std::chrono::seconds xrpl::Config::maxUnknownTime {600} |
Definition at line 309 of file src/xrpld/core/Config.h.
| std::chrono::seconds xrpl::Config::maxDivergedTime {300} |
Definition at line 312 of file src/xrpld/core/Config.h.
| std::optional<std::size_t> xrpl::Config::maxUntrustedCount |
Definition at line 320 of file src/xrpld/core/Config.h.
| std::optional<std::size_t> xrpl::Config::maxTrustedCount |
Definition at line 321 of file src/xrpld/core/Config.h.
|
staticconstexpr |
Definition at line 328 of file src/xrpld/core/Config.h.
|
staticconstexpr |
Definition at line 329 of file src/xrpld/core/Config.h.
| bool xrpl::Config::betaRpcApi = false |
Definition at line 332 of file src/xrpld/core/Config.h.
| bool xrpl::Config::fastLoad = false |
Definition at line 335 of file src/xrpld/core/Config.h.
| std::optional<std::pair<std::uint32_t, std::uint32_t> > xrpl::Config::forcedLedgerRangePresent |
Definition at line 342 of file src/xrpld/core/Config.h.
| std::optional<std::size_t> xrpl::Config::validatorListThreshold |
Definition at line 344 of file src/xrpld/core/Config.h.
|
privateinherited |
Definition at line 224 of file BasicConfig.h.