mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 20:15:51 +00:00
Report server domain to other servers:
This commit introduces a new configuration option that server operators can set. The value is communicated to other servers and is also reported via the `server_info` API. The value is meant to allow third-party applications or tools to group servers together. For example, a tool that visualizes the network's topology can group servers together. Similar to the "Domain" field in validator manifests, an operator can claim any domain. Prior to relying on the value returned, the domain should be verified by retrieving the xrp-ledger.toml file from the domain and looking for the server's public key in the `nodes` array.
This commit is contained in:
committed by
manojsdoshi
parent
efa615a5e3
commit
d282b0bf85
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <ripple/basics/FileUtilities.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/basics/StringUtilities.h>
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/beast/core/LexicalCast.h>
|
||||
#include <ripple/core/Config.h>
|
||||
@@ -496,6 +497,18 @@ Config::loadFromString(std::string const& fileContents)
|
||||
MAX_JOB_QUEUE_TX);
|
||||
}
|
||||
|
||||
if (getSingleSection(secConfig, SECTION_SERVER_DOMAIN, strTemp, j_))
|
||||
{
|
||||
if (!isProperlyFormedTomlDomain(strTemp))
|
||||
{
|
||||
Throw<std::runtime_error>(
|
||||
"Invalid " SECTION_SERVER_DOMAIN
|
||||
": the domain name does not appear to meet the requirements.");
|
||||
}
|
||||
|
||||
SERVER_DOMAIN = strTemp;
|
||||
}
|
||||
|
||||
if (getSingleSection(
|
||||
secConfig, SECTION_AMENDMENT_MAJORITY_TIME, strTemp, j_))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user