diff --git a/OverlayImpl_8cpp_source.html b/OverlayImpl_8cpp_source.html
index 1f264af552..4f3e754807 100644
--- a/OverlayImpl_8cpp_source.html
+++ b/OverlayImpl_8cpp_source.html
@@ -1839,7 +1839,7 @@ $(function() {
Json::Value getOverlayInfo()
Returns information about peers on the overlay network.
boost::asio::io_service & io_service_
virtual Config & config()=0
-Json::Value getJson() const
Return JSON representation of configured validator sites.
+Json::Value getJson() const
Return JSON representation of configured validator sites.
std::vector< std::string > IPS_FIXED
diff --git a/ValidatorListSites_8cpp_source.html b/ValidatorListSites_8cpp_source.html
index dce35af440..3e61e53d9e 100644
--- a/ValidatorListSites_8cpp_source.html
+++ b/ValidatorListSites_8cpp_source.html
@@ -114,7 +114,7 @@ $(function() {
@ rpcREPORTING_UNSUPPORTED
virtual Config & config()=0
-Json::Value getJson() const
Return JSON representation of configured validator sites.
+Json::Value getJson() const
Return JSON representation of configured validator sites.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
diff --git a/ValidatorSite_8cpp_source.html b/ValidatorSite_8cpp_source.html
index 72e17904b7..5103d52860 100644
--- a/ValidatorSite_8cpp_source.html
+++ b/ValidatorSite_8cpp_source.html
@@ -387,373 +387,384 @@ $(function() {
- 319 JLOG(
j_.
warn()) <<
"Request for " <<
sites_[siteIdx].activeResource->uri
-
-
-
-
- 324 if (
auto sp =
work_.lock())
-
-
-
-
-
-
-
-
-
-
- 335 if (ec != boost::asio::error::operation_aborted)
-
-
-
-
-
-
-
- 343 sites_[siteIdx].nextRefresh =
-
- 345 sites_[siteIdx].redirCount = 0;
-
-
-
-
-
-
- 352 boost::system::error_code{-1, boost::system::generic_category()},
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 370 JLOG(
j_.
warn()) <<
"Unable to parse JSON response from "
- 371 <<
sites_[siteIdx].activeResource->uri;
-
-
-
-
-
- 377 auto const [valid, version, blobs] = [&body]() {
-
-
-
- 381 body[jss::version].
isInt();
-
-
-
-
-
- 387 version = body[jss::version].
asUInt();
-
- 389 valid = !blobs.
empty();
-
-
-
-
-
-
- 396 JLOG(
j_.
warn()) <<
"Missing fields in JSON response from "
- 397 <<
sites_[siteIdx].activeResource->uri;
-
-
-
-
- 402 assert(version == body[jss::version].asUInt());
- 403 auto const& uri =
sites_[siteIdx].activeResource->uri;
-
-
-
-
-
-
-
-
-
-
-
- 415 sites_[siteIdx].lastRefreshStatus.emplace(
-
-
- 418 for (
auto const& [disp, count] : applyResult.dispositions)
-
-
-
-
- 423 JLOG(
j_.
debug()) <<
"Applied " << count
- 424 <<
" new validator list(s) from " << uri;
-
-
- 427 JLOG(
j_.
debug()) <<
"Applied " << count
- 428 <<
" expired validator list(s) from " << uri;
-
-
-
- 432 <<
"Ignored " << count
- 433 <<
" validator list(s) with current sequence from " << uri;
-
-
- 436 JLOG(
j_.
debug()) <<
"Processed " << count
- 437 <<
" future validator list(s) from " << uri;
-
-
-
- 441 <<
"Ignored " << count
- 442 <<
" validator list(s) with future known sequence from "
-
-
-
- 446 JLOG(
j_.
warn()) <<
"Ignored " << count
- 447 <<
"stale validator list(s) from " << uri;
-
-
- 450 JLOG(
j_.
warn()) <<
"Ignored " << count
- 451 <<
" untrusted validator list(s) from " << uri;
-
-
- 454 JLOG(
j_.
warn()) <<
"Ignored " << count
- 455 <<
" invalid validator list(s) from " << uri;
-
-
-
- 459 <<
"Ignored " << count
- 460 <<
" unsupported version validator list(s) from " << uri;
-
-
-
-
-
-
- 467 if (body.
isMember(jss::refresh_interval) &&
-
-
- 470 using namespace std::chrono_literals;
-
-
-
-
- 475 sites_[siteIdx].refreshInterval = refresh;
- 476 sites_[siteIdx].nextRefresh =
-
-
-
-
-
-
-
-
-
-
- 487 using namespace boost::beast::http;
-
- 489 if (res.find(field::location) == res.end() || res[field::location].empty())
-
- 491 JLOG(
j_.
warn()) <<
"Request for validator list at "
- 492 <<
sites_[siteIdx].activeResource->uri
- 493 <<
" returned a redirect with no Location.";
-
-
-
-
-
- 499 JLOG(
j_.
warn()) <<
"Exceeded max redirects for validator list at "
- 500 <<
sites_[siteIdx].loadedResource->uri;
-
-
-
- 504 JLOG(
j_.
debug()) <<
"Got redirect for validator list from "
- 505 <<
sites_[siteIdx].activeResource->uri
- 506 <<
" to new location " << res[field::location];
+
+
+
+
+
+
+ 325 auto const& site =
sites_[siteIdx];
+ 326 if (site.activeResource)
+ 327 JLOG(
j_.
warn()) <<
"Request for " << site.activeResource->uri
+
+
+ 330 JLOG(
j_.
error()) <<
"Request took too long, but a response has "
+ 331 "already been processed";
+
+
+
+ 335 if (
auto sp =
work_.lock())
+
+
+
+
+
+
+
+
+
+
+ 346 if (ec != boost::asio::error::operation_aborted)
+
+
+
+
+
+
+
+ 354 sites_[siteIdx].nextRefresh =
+
+ 356 sites_[siteIdx].redirCount = 0;
+
+
+
+
+
+
+ 363 boost::system::error_code{-1, boost::system::generic_category()},
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 381 JLOG(
j_.
warn()) <<
"Unable to parse JSON response from "
+ 382 <<
sites_[siteIdx].activeResource->uri;
+
+
+
+
+
+ 388 auto const [valid, version, blobs] = [&body]() {
+
+
+
+ 392 body[jss::version].
isInt();
+
+
+
+
+
+ 398 version = body[jss::version].
asUInt();
+
+ 400 valid = !blobs.
empty();
+
+
+
+
+
+
+ 407 JLOG(
j_.
warn()) <<
"Missing fields in JSON response from "
+ 408 <<
sites_[siteIdx].activeResource->uri;
+
+
+
+
+ 413 assert(version == body[jss::version].asUInt());
+ 414 auto const& uri =
sites_[siteIdx].activeResource->uri;
+
+
+
+
+
+
+
+
+
+
+
+ 426 sites_[siteIdx].lastRefreshStatus.emplace(
+
+
+ 429 for (
auto const& [disp, count] : applyResult.dispositions)
+
+
+
+
+ 434 JLOG(
j_.
debug()) <<
"Applied " << count
+ 435 <<
" new validator list(s) from " << uri;
+
+
+ 438 JLOG(
j_.
debug()) <<
"Applied " << count
+ 439 <<
" expired validator list(s) from " << uri;
+
+
+
+ 443 <<
"Ignored " << count
+ 444 <<
" validator list(s) with current sequence from " << uri;
+
+
+ 447 JLOG(
j_.
debug()) <<
"Processed " << count
+ 448 <<
" future validator list(s) from " << uri;
+
+
+
+ 452 <<
"Ignored " << count
+ 453 <<
" validator list(s) with future known sequence from "
+
+
+
+ 457 JLOG(
j_.
warn()) <<
"Ignored " << count
+ 458 <<
"stale validator list(s) from " << uri;
+
+
+ 461 JLOG(
j_.
warn()) <<
"Ignored " << count
+ 462 <<
" untrusted validator list(s) from " << uri;
+
+
+ 465 JLOG(
j_.
warn()) <<
"Ignored " << count
+ 466 <<
" invalid validator list(s) from " << uri;
+
+
+
+ 470 <<
"Ignored " << count
+ 471 <<
" unsupported version validator list(s) from " << uri;
+
+
+
+
+
+
+ 478 if (body.
isMember(jss::refresh_interval) &&
+
+
+ 481 using namespace std::chrono_literals;
+
+
+
+
+ 486 sites_[siteIdx].refreshInterval = refresh;
+ 487 sites_[siteIdx].nextRefresh =
+
+
+
+
+
+
+
+
+
+
+ 498 using namespace boost::beast::http;
+
+ 500 if (res.find(field::location) == res.end() || res[field::location].empty())
+
+ 502 JLOG(
j_.
warn()) <<
"Request for validator list at "
+ 503 <<
sites_[siteIdx].activeResource->uri
+ 504 <<
" returned a redirect with no Location.";
+
+
-
+
-
- 511 std::make_shared<Site::Resource>(
std::string(res[field::location]));
- 512 ++
sites_[siteIdx].redirCount;
- 513 if (newLocation->pUrl.scheme !=
"http" &&
- 514 newLocation->pUrl.scheme !=
"https")
-
- 516 "invalid scheme in redirect " + newLocation->pUrl.scheme);
-
-
-
- 520 JLOG(
j_.
error()) <<
"Invalid redirect location: "
- 521 << res[field::location];
-
-
-
-
-
-
-
- 529 boost::system::error_code
const& ec,
-
-
-
-
-
-
-
- 537 sites_[siteIdx].lastRequestEndpoint = endpoint;
- 538 JLOG(
j_.
debug()) <<
"Got completion for "
- 539 <<
sites_[siteIdx].activeResource->uri <<
" "
-
- 541 auto onError = [&](
std::string const& errMsg,
bool retry) {
-
-
-
- 545 sites_[siteIdx].nextRefresh =
-
-
-
-
-
-
-
-
-
- 555 <<
"Problem retrieving from "
- 556 <<
sites_[siteIdx].activeResource->uri <<
" " << endpoint <<
" "
- 557 << ec.value() <<
":" << ec.message();
- 558 onError(
"fetch error",
true);
-
-
-
-
-
- 564 using namespace boost::beast::http;
- 565 switch (res.result())
-
-
- 568 sites_[siteIdx].lastRequestSuccessful =
true;
-
-
- 571 case status::moved_permanently:
- 572 case status::permanent_redirect:
-
- 574 case status::temporary_redirect: {
-
-
-
-
- 579 if (res.result() == status::moved_permanently ||
- 580 res.result() == status::permanent_redirect)
-
- 582 sites_[siteIdx].startingResource = newLocation;
-
-
-
-
-
-
-
- 590 <<
"Request for validator list at "
- 591 <<
sites_[siteIdx].activeResource->uri <<
" "
-
- 593 <<
" returned bad status: " << res.result_int();
- 594 onError(
"bad result code",
true);
-
-
-
-
-
- 600 onError(ex.
what(),
false);
-
-
- 603 sites_[siteIdx].activeResource.reset();
-
-
-
-
-
-
-
-
-
-
-
- 615 boost::system::error_code
const& ec,
-
-
-
-
-
-
-
-
-
- 625 JLOG(
j_.
warn()) <<
"Problem retrieving from "
- 626 <<
sites_[siteIdx].activeResource->uri <<
" "
- 627 << ec.value() <<
": " << ec.message();
-
-
-
- 631 sites_[siteIdx].lastRequestSuccessful =
true;
-
-
-
-
-
-
-
-
- 640 sites_[siteIdx].activeResource.reset();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 664 uri << site.loadedResource->uri;
- 665 if (site.loadedResource != site.startingResource)
- 666 uri <<
" (redirects to " << site.startingResource->uri +
")";
- 667 v[jss::uri] = uri.
str();
- 668 v[jss::next_refresh_time] =
to_string(site.nextRefresh);
- 669 if (site.lastRefreshStatus)
-
- 671 v[jss::last_refresh_time] =
- 672 to_string(site.lastRefreshStatus->refreshed);
- 673 v[jss::last_refresh_status] =
- 674 to_string(site.lastRefreshStatus->disposition);
- 675 if (!site.lastRefreshStatus->message.empty())
- 676 v[jss::last_refresh_message] =
- 677 site.lastRefreshStatus->message;
-
- 679 v[jss::refresh_interval_min] =
- 680 static_cast<Int
>(site.refreshInterval.count());
-
-
-
-
-
+ 510 JLOG(
j_.
warn()) <<
"Exceeded max redirects for validator list at "
+ 511 <<
sites_[siteIdx].loadedResource->uri;
+
+
+
+ 515 JLOG(
j_.
debug()) <<
"Got redirect for validator list from "
+ 516 <<
sites_[siteIdx].activeResource->uri
+ 517 <<
" to new location " << res[field::location];
+
+
+
+
+ 522 std::make_shared<Site::Resource>(
std::string(res[field::location]));
+ 523 ++
sites_[siteIdx].redirCount;
+ 524 if (newLocation->pUrl.scheme !=
"http" &&
+ 525 newLocation->pUrl.scheme !=
"https")
+
+ 527 "invalid scheme in redirect " + newLocation->pUrl.scheme);
+
+
+
+ 531 JLOG(
j_.
error()) <<
"Invalid redirect location: "
+ 532 << res[field::location];
+
+
+
+
+
+
+
+ 540 boost::system::error_code
const& ec,
+
+
+
+
+
+
+
+ 548 sites_[siteIdx].lastRequestEndpoint = endpoint;
+ 549 JLOG(
j_.
debug()) <<
"Got completion for "
+ 550 <<
sites_[siteIdx].activeResource->uri <<
" "
+
+ 552 auto onError = [&](
std::string const& errMsg,
bool retry) {
+
+
+
+ 556 sites_[siteIdx].nextRefresh =
+
+
+
+
+
+
+
+
+
+ 566 <<
"Problem retrieving from "
+ 567 <<
sites_[siteIdx].activeResource->uri <<
" " << endpoint <<
" "
+ 568 << ec.value() <<
":" << ec.message();
+ 569 onError(
"fetch error",
true);
+
+
+
+
+
+ 575 using namespace boost::beast::http;
+ 576 switch (res.result())
+
+
+ 579 sites_[siteIdx].lastRequestSuccessful =
true;
+
+
+ 582 case status::moved_permanently:
+ 583 case status::permanent_redirect:
+
+ 585 case status::temporary_redirect: {
+
+
+
+
+ 590 if (res.result() == status::moved_permanently ||
+ 591 res.result() == status::permanent_redirect)
+
+ 593 sites_[siteIdx].startingResource = newLocation;
+
+
+
+
+
+
+
+ 601 <<
"Request for validator list at "
+ 602 <<
sites_[siteIdx].activeResource->uri <<
" "
+
+ 604 <<
" returned bad status: " << res.result_int();
+ 605 onError(
"bad result code",
true);
+
+
+
+
+
+ 611 onError(ex.
what(),
false);
+
+
+ 614 sites_[siteIdx].activeResource.reset();
+
+
+
+
+
+
+
+
+
+
+
+ 626 boost::system::error_code
const& ec,
+
+
+
+
+
+
+
+
+
+ 636 JLOG(
j_.
warn()) <<
"Problem retrieving from "
+ 637 <<
sites_[siteIdx].activeResource->uri <<
" "
+ 638 << ec.value() <<
": " << ec.message();
+
+
+
+ 642 sites_[siteIdx].lastRequestSuccessful =
true;
+
+
+
+
+
+
+
+
+ 651 sites_[siteIdx].activeResource.reset();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 675 uri << site.loadedResource->uri;
+ 676 if (site.loadedResource != site.startingResource)
+ 677 uri <<
" (redirects to " << site.startingResource->uri +
")";
+ 678 v[jss::uri] = uri.
str();
+ 679 v[jss::next_refresh_time] =
to_string(site.nextRefresh);
+ 680 if (site.lastRefreshStatus)
+
+ 682 v[jss::last_refresh_time] =
+ 683 to_string(site.lastRefreshStatus->refreshed);
+ 684 v[jss::last_refresh_status] =
+ 685 to_string(site.lastRefreshStatus->disposition);
+ 686 if (!site.lastRefreshStatus->message.empty())
+ 687 v[jss::last_refresh_message] =
+ 688 site.lastRefreshStatus->message;
+
+ 690 v[jss::refresh_interval_min] =
+ 691 static_cast<Int
>(site.refreshInterval.count());
+
+
+
+
+
@@ -787,7 +798,7 @@ $(function() {
static std::vector< ValidatorBlobInfo > parseBlobs(std::uint32_t version, Json::Value const &body)
Pull the blob/signature/manifest information out of the appropriate Json body fields depending on the...
Unserialize a JSON document into a Value.
-void onSiteFetch(boost::system::error_code const &ec, endpoint_type const &endpoint, detail::response_type &&res, std::size_t siteIdx)
Store latest list fetched from site.
+void onSiteFetch(boost::system::error_code const &ec, endpoint_type const &endpoint, detail::response_type &&res, std::size_t siteIdx)
Store latest list fetched from site.
@ expired
List is expired, but has the largest non-pending sequence seen so far.
@@ -803,12 +814,12 @@ $(function() {
std::optional< std::uint16_t > port
virtual Config & config()=0
-Json::Value getJson() const
Return JSON representation of configured validator sites.
+Json::Value getJson() const
Return JSON representation of configured validator sites.
std::condition_variable cv_
-void parseJsonResponse(std::string const &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Parse json response from validator list site.
+void parseJsonResponse(std::string const &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Parse json response from validator list site.
bool parseUrl(parsedURL &pUrl, std::string const &strUrl)
@@ -818,7 +829,7 @@ $(function() {
constexpr auto error_retry_interval
-std::shared_ptr< Site::Resource > processRedirect(detail::response_type &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Interpret a redirect response.
+std::shared_ptr< Site::Resource > processRedirect(detail::response_type &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Interpret a redirect response.
@ unsupported_version
List version is not supported.
virtual ValidatorList & validators()=0
@@ -832,7 +843,7 @@ $(function() {
@ same_sequence
Same sequence as current list.
Resource(std::string uri_)
-void onTextFetch(boost::system::error_code const &ec, std::string const &res, std::size_t siteIdx)
Store latest list fetched from anywhere.
+void onTextFetch(boost::system::error_code const &ec, std::string const &res, std::size_t siteIdx)
Store latest list fetched from anywhere.
std::shared_ptr< Resource > loadedResource
the original uri as loaded from config
std::atomic< bool > stopping_
sha512_half_hasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
@@ -852,7 +863,7 @@ $(function() {
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
void start()
Start fetching lists from sites.
-void onTimer(std::size_t siteIdx, error_code const &ec)
Fetch site whose time has come.
+void onTimer(std::size_t siteIdx, error_code const &ec)
Fetch site whose time has come.
boost::system::error_code error_code
diff --git a/ValidatorSite_8h_source.html b/ValidatorSite_8h_source.html
index 8e3bdffcfb..b7bcf740b0 100644
--- a/ValidatorSite_8h_source.html
+++ b/ValidatorSite_8h_source.html
@@ -272,7 +272,7 @@ $(function() {
bool lastRequestSuccessful
void makeRequest(std::shared_ptr< Site::Resource > resource, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Initiate request to given resource.
-void onSiteFetch(boost::system::error_code const &ec, endpoint_type const &endpoint, detail::response_type &&res, std::size_t siteIdx)
Store latest list fetched from site.
+void onSiteFetch(boost::system::error_code const &ec, endpoint_type const &endpoint, detail::response_type &&res, std::size_t siteIdx)
Store latest list fetched from site.
std::atomic< bool > fetching_
@@ -282,15 +282,15 @@ $(function() {
clock_type::time_point refreshed
std::atomic< bool > pending_
-Json::Value getJson() const
Return JSON representation of configured validator sites.
+Json::Value getJson() const
Return JSON representation of configured validator sites.
std::condition_variable cv_
-void parseJsonResponse(std::string const &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Parse json response from validator list site.
+void parseJsonResponse(std::string const &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Parse json response from validator list site.
A generic endpoint for log messages.
void join()
Wait for current fetches from sites to complete.
-std::shared_ptr< Site::Resource > processRedirect(detail::response_type &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Interpret a redirect response.
+std::shared_ptr< Site::Resource > processRedirect(detail::response_type &res, std::size_t siteIdx, std::lock_guard< std::mutex > const &)
Interpret a redirect response.
unsigned short redirCount
@@ -302,7 +302,7 @@ $(function() {
std::shared_ptr< Resource > activeResource
the active resource being requested.
Resource(std::string uri_)
-void onTextFetch(boost::system::error_code const &ec, std::string const &res, std::size_t siteIdx)
Store latest list fetched from anywhere.
+void onTextFetch(boost::system::error_code const &ec, std::string const &res, std::size_t siteIdx)
Store latest list fetched from anywhere.
ListDisposition disposition
std::shared_ptr< Resource > loadedResource
the original uri as loaded from config
std::atomic< bool > stopping_
@@ -315,7 +315,7 @@ $(function() {
void start()
Start fetching lists from sites.
-void onTimer(std::size_t siteIdx, error_code const &ec)
Fetch site whose time has come.
+void onTimer(std::size_t siteIdx, error_code const &ec)
Fetch site whose time has come.
std::shared_ptr< Resource > startingResource
the resource to request at <timer> intervals.
boost::system::error_code error_code
bool missingSite(std::lock_guard< std::mutex > const &)
If no sites are provided, or a site fails to load, get a list of local cache files from the Validator...
diff --git a/classripple_1_1ValidatorSite.html b/classripple_1_1ValidatorSite.html
index a16d7468ec..b1bc3903a9 100644
--- a/classripple_1_1ValidatorSite.html
+++ b/classripple_1_1ValidatorSite.html
@@ -484,7 +484,7 @@ Validator Sites
Return JSON representation of configured validator sites.
-Definition at line 651 of file ValidatorSite.cpp.
+Definition at line 662 of file ValidatorSite.cpp.
@@ -644,7 +644,7 @@ Validator Sites
Fetch site whose time has come.
-Definition at line 329 of file ValidatorSite.cpp.
+Definition at line 340 of file ValidatorSite.cpp.
@@ -696,7 +696,7 @@ Validator Sites
Store latest list fetched from site.
-Definition at line 528 of file ValidatorSite.cpp.
+Definition at line 539 of file ValidatorSite.cpp.
@@ -742,7 +742,7 @@ Validator Sites
Store latest list fetched from anywhere.
-Definition at line 614 of file ValidatorSite.cpp.
+Definition at line 625 of file ValidatorSite.cpp.
@@ -836,7 +836,7 @@ Validator Sites
Parse json response from validator list site.
lock over sites_mutex_ required
-Definition at line 360 of file ValidatorSite.cpp.
+Definition at line 371 of file ValidatorSite.cpp.
@@ -883,7 +883,7 @@ Validator Sites
Interpret a redirect response.
lock over sites_mutex_ required
-Definition at line 482 of file ValidatorSite.cpp.
+Definition at line 493 of file ValidatorSite.cpp.