mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 04:25:51 +00:00
Fetch validator lists from remote sites:
Validator lists from configured remote sites are fetched at a regular interval. Fetched lists are expected to be in JSON format and contain the following fields: * "manifest": Base64-encoded serialization of a manifest containing the validator publisher's master and signing public keys. * "blob": Base64-encoded JSON string containing a "sequence", "expiration" and "validators" field. "expiration" contains the Ripple timestamp (seconds since January 1st, 2000 (00:00 UTC)) for when the list expires. "validators" contains an array of objects with a "validation_public_key" field. * "signature": Hex-encoded signature of the blob using the publisher's signing key. * "version": 1 * "refreshInterval" (optional)
This commit is contained in:
@@ -503,6 +503,13 @@ void Config::loadFromString (std::string const& fileContents)
|
||||
if (valKeyEntries)
|
||||
section (SECTION_VALIDATOR_KEYS).append (*valKeyEntries);
|
||||
|
||||
auto valSiteEntries = getIniFileSection(
|
||||
iniFile,
|
||||
SECTION_VALIDATOR_LIST_SITES);
|
||||
|
||||
if (valSiteEntries)
|
||||
section (SECTION_VALIDATOR_LIST_SITES).append (*valSiteEntries);
|
||||
|
||||
auto valListKeys = getIniFileSection(
|
||||
iniFile,
|
||||
SECTION_VALIDATOR_LIST_KEYS);
|
||||
@@ -523,6 +530,14 @@ void Config::loadFromString (std::string const& fileContents)
|
||||
// Consolidate [validator_keys] and [validators]
|
||||
section (SECTION_VALIDATORS).append (
|
||||
section (SECTION_VALIDATOR_KEYS).lines ());
|
||||
|
||||
if (! section (SECTION_VALIDATOR_LIST_SITES).lines().empty() &&
|
||||
section (SECTION_VALIDATOR_LIST_KEYS).lines().empty())
|
||||
{
|
||||
Throw<std::runtime_error> (
|
||||
"[" + std::string(SECTION_VALIDATOR_LIST_KEYS) +
|
||||
"] config section is missing");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user