diff --git a/Application_8cpp_source.html b/Application_8cpp_source.html
index 33d0b4e784..518b3ae943 100644
--- a/Application_8cpp_source.html
+++ b/Application_8cpp_source.html
@@ -2583,9 +2583,9 @@ $(function() {
create_genesis_t const create_genesis
static void fixConfigPorts(Config &config, Endpoints const &endpoints)
std::unique_ptr< AmendmentTable > make_AmendmentTable(Application &app, std::chrono::seconds majorityTime, std::vector< AmendmentTable::FeatureInfo > const &supported, Section const &enabled, Section const &vetoed, beast::Journal journal)
-Overlay::Setup setup_Overlay(BasicConfig const &config)
+Overlay::Setup setup_Overlay(BasicConfig const &config)
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
-std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Creates the implementation of Overlay.
+std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Creates the implementation of Overlay.
std::unique_ptr< SHAMapStore > make_SHAMapStore(Application &app, NodeStore::Scheduler &scheduler, beast::Journal journal)
diff --git a/OverlayImpl_8cpp_source.html b/OverlayImpl_8cpp_source.html
index 85296642e1..ca374beb59 100644
--- a/OverlayImpl_8cpp_source.html
+++ b/OverlayImpl_8cpp_source.html
@@ -581,1085 +581,1088 @@ $(function() {
505 bootstrapIps.push_back(
"hubs.xrpkuwait.com 51235");
-
-
-
-
-
-
-
-
-
- 515 for (
auto const& addr : addresses)
-
- 517 if (addr.port() == 0)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 539 for (
auto& addr : addresses)
-
- 541 if (addr.port() == 0)
-
-
-
-
-
-
-
-
-
- 551 auto const timer = std::make_shared<Timer>(*
this);
-
- 553 list_.emplace(timer.get(), timer);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 580 for (
auto const& i : stats)
-
-
-
-
- 585 item[
"category"] = i.name;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 606 auto const result(
ids_.emplace(
- 607 std::piecewise_construct,
-
-
-
-
- 612 "ripple::OverlayImpl::activate : peer ID is inserted");
-
-
-
- 616 JLOG(
journal_.
debug()) <<
"activated " << peer->getRemoteAddress() <<
" ("
-
-
-
-
-
-
- 623 XRPL_ASSERT(
size(),
"ripple::OverlayImpl::activate : nonzero peers");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 638 auto const n = m->list_size();
- 639 auto const& journal = from->pjournal();
-
- 641 protocol::TMManifests
relay;
-
-
-
- 645 auto& s = m->list().Get(i).stobject();
-
-
-
- 649 auto const serialized = mo->serialized;
-
-
-
+
+
+ 508 bootstrapIps.push_back(
"hub.xrpl-commons.org 51235");
+
+
+
+
+
+
+
+
+
+ 518 for (
auto const& addr : addresses)
+
+ 520 if (addr.port() == 0)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 542 for (
auto& addr : addresses)
+
+ 544 if (addr.port() == 0)
+
+
+
+
+
+
+
+
+
+ 554 auto const timer = std::make_shared<Timer>(*
this);
+
+ 556 list_.emplace(timer.get(), timer);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 583 for (
auto const& i : stats)
+
+
+
+
+ 588 item[
"category"] = i.name;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 609 auto const result(
ids_.emplace(
+ 610 std::piecewise_construct,
+
+
+
+
+ 615 "ripple::OverlayImpl::activate : peer ID is inserted");
+
+
+
+ 619 JLOG(
journal_.
debug()) <<
"activated " << peer->getRemoteAddress() <<
" ("
+
+
+
+
+
+
+ 626 XRPL_ASSERT(
size(),
"ripple::OverlayImpl::activate : nonzero peers");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 641 auto const n = m->list_size();
+ 642 auto const& journal = from->pjournal();
+
+ 644 protocol::TMManifests
relay;
+
+
+
+ 648 auto& s = m->list().Get(i).stobject();
+
+
+
+ 652 auto const serialized = mo->serialized;
-
-
- 656 relay.add_list()->set_stobject(s);
-
-
-
-
-
-
-
- 664 "ripple::OverlayImpl::onManifests : manifest "
- 665 "deserialization succeeded");
-
-
-
-
-
-
-
-
-
-
-
-
- 678 JLOG(journal.debug())
- 679 <<
"Malformed manifest #" << i + 1 <<
": " <<
strHex(s);
-
-
-
-
- 684 if (!
relay.list().empty())
- 685 for_each([m2 = std::make_shared<Message>(
relay, protocol::mtMANIFESTS)](
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 725 sp->getNodePublic().data(), sp->getNodePublic().size());
- 726 pv[jss::type] = sp->slot()->inbound() ?
"in" :
"out";
-
- 728 duration_cast<seconds>(sp->uptime()).count());
-
-
- 731 pv[jss::ip] = sp->getRemoteAddress().address().to_string();
- 732 if (sp->slot()->inbound())
-
- 734 if (
auto port = sp->slot()->listening_port())
- 735 pv[jss::port] = *port;
-
-
-
-
-
-
-
-
- 744 auto version{sp->getVersion()};
- 745 if (!version.empty())
-
-
-
-
-
- 751 sp->ledgerRange(minSeq, maxSeq);
- 752 if (minSeq != 0 || maxSeq != 0)
- 753 pv[jss::complete_ledgers] =
-
-
-
-
-
+
+
+
+
+
+ 659 relay.add_list()->set_stobject(s);
+
+
+
+
+
+
+
+ 667 "ripple::OverlayImpl::onManifests : manifest "
+ 668 "deserialization succeeded");
+
+
+
+
+
+
+
+
+
+
+
+
+ 681 JLOG(journal.debug())
+ 682 <<
"Malformed manifest #" << i + 1 <<
": " <<
strHex(s);
+
+
+
+
+ 687 if (!
relay.list().empty())
+ 688 for_each([m2 = std::make_shared<Message>(
relay, protocol::mtMANIFESTS)](
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 728 sp->getNodePublic().data(), sp->getNodePublic().size());
+ 729 pv[jss::type] = sp->slot()->inbound() ?
"in" :
"out";
+
+ 731 duration_cast<seconds>(sp->uptime()).count());
+
+
+ 734 pv[jss::ip] = sp->getRemoteAddress().address().to_string();
+ 735 if (sp->slot()->inbound())
+
+ 737 if (
auto port = sp->slot()->listening_port())
+ 738 pv[jss::port] = *port;
+
+
+
+
+
+
+
+
+ 747 auto version{sp->getVersion()};
+ 748 if (!version.empty())
+
+
+
+
+
+ 754 sp->ledgerRange(minSeq, maxSeq);
+ 755 if (minSeq != 0 || maxSeq != 0)
+ 756 pv[jss::complete_ledgers] =
+
+
-
-
-
- 763 bool const humanReadable =
false;
- 764 bool const admin =
false;
- 765 bool const counters =
false;
-
-
-
+
+
+
+
+
+
+ 766 bool const humanReadable =
false;
+ 767 bool const admin =
false;
+ 768 bool const counters =
false;
-
-
- 772 server_info.
removeMember(jss::load_factor_fee_escalation);
-
-
-
- 776 if (server_info.
isMember(jss::validated_ledger))
-
- 778 Json::Value& validated_ledger = server_info[jss::validated_ledger];
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 775 server_info.
removeMember(jss::load_factor_fee_escalation);
+
+
+
+ 779 if (server_info.
isMember(jss::validated_ledger))
+
+ 781 Json::Value& validated_ledger = server_info[jss::validated_ledger];
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
- 799 if (validators.
isMember(jss::publisher_lists))
-
- 801 Json::Value& publisher_lists = validators[jss::publisher_lists];
-
- 803 for (
auto& publisher : publisher_lists)
-
-
-
-
-
-
-
-
-
-
-
- 815 if (validatorSites.
isMember(jss::validator_sites))
-
- 817 validators[jss::validator_sites] =
- 818 std::move(validatorSites[jss::validator_sites]);
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 802 if (validators.
isMember(jss::publisher_lists))
+
+ 804 Json::Value& publisher_lists = validators[jss::publisher_lists];
+
+ 806 for (
auto& publisher : publisher_lists)
+
+
+
+
+
+
+
+
+
+
+
+ 818 if (validatorSites.
isMember(jss::validator_sites))
+
+ 820 validators[jss::validator_sites] =
+ 821 std::move(validatorSites[jss::validator_sites]);
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 839 if (req.target() !=
"/crawl" ||
-
-
-
- 843 boost::beast::http::response<json_body> msg;
- 844 msg.version(req.version());
- 845 msg.result(boost::beast::http::status::ok);
-
- 847 msg.insert(
"Content-Type",
"application/json");
- 848 msg.insert(
"Connection",
"close");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 868 msg.prepare_payload();
- 869 handoff.
response = std::make_shared<SimpleWriter>(msg);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 842 if (req.target() !=
"/crawl" ||
+
+
+
+ 846 boost::beast::http::response<json_body> msg;
+ 847 msg.version(req.version());
+ 848 msg.result(boost::beast::http::status::ok);
+
+ 850 msg.insert(
"Content-Type",
"application/json");
+ 851 msg.insert(
"Connection",
"close");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 871 msg.prepare_payload();
+ 872 handoff.
response = std::make_shared<SimpleWriter>(msg);
+
+
+
+
+
+
+
+
+
+
+
-
-
- 887 boost::beast::http::response<json_body> msg;
- 888 msg.version(req.version());
-
- 890 msg.insert(
"Content-Type",
"application/json");
- 891 msg.insert(
"Connection",
"close");
-
- 893 auto fail = [&msg, &handoff](
auto status) {
-
- 895 msg.insert(
"Content-Length",
"0");
-
-
-
- 899 msg.prepare_payload();
- 900 handoff.
response = std::make_shared<SimpleWriter>(msg);
-
-
-
-
-
- 906 if (
auto slash = key.
find(
'/'); slash != std::string_view::npos)
-
- 908 auto verString = key.
substr(0, slash);
- 909 if (!boost::conversion::try_lexical_convert(verString, version))
- 910 return fail(boost::beast::http::status::bad_request);
- 911 key = key.
substr(slash + 1);
-
-
-
- 915 return fail(boost::beast::http::status::bad_request);
+
+
+
+
+
+ 890 boost::beast::http::response<json_body> msg;
+ 891 msg.version(req.version());
+
+ 893 msg.insert(
"Content-Type",
"application/json");
+ 894 msg.insert(
"Connection",
"close");
+
+ 896 auto fail = [&msg, &handoff](
auto status) {
+
+ 898 msg.insert(
"Content-Length",
"0");
+
+
+
+ 902 msg.prepare_payload();
+ 903 handoff.
response = std::make_shared<SimpleWriter>(msg);
+
+
+
+
+
+ 909 if (
auto slash = key.
find(
'/'); slash != std::string_view::npos)
+
+ 911 auto verString = key.
substr(0, slash);
+ 912 if (!boost::conversion::try_lexical_convert(verString, version))
+ 913 return fail(boost::beast::http::status::bad_request);
+ 914 key = key.
substr(slash + 1);
+
-
-
+
+ 918 return fail(boost::beast::http::status::bad_request);
-
-
-
- 923 return fail(boost::beast::http::status::not_found);
-
-
-
- 927 return fail(boost::beast::http::status::bad_request);
-
-
-
- 931 msg.result(boost::beast::http::status::ok);
-
-
-
- 935 msg.prepare_payload();
- 936 handoff.
response = std::make_shared<SimpleWriter>(msg);
-
-
-
-
-
-
-
- 944 if (req.target() !=
"/health")
-
- 946 boost::beast::http::response<json_body> msg;
- 947 msg.version(req.version());
-
- 949 msg.insert(
"Content-Type",
"application/json");
- 950 msg.insert(
"Connection",
"close");
-
-
-
- 954 int last_validated_ledger_age = -1;
- 955 if (info.isMember(jss::validated_ledger))
- 956 last_validated_ledger_age =
- 957 info[jss::validated_ledger][jss::age].asInt();
- 958 bool amendment_blocked =
false;
- 959 if (info.isMember(jss::amendment_blocked))
- 960 amendment_blocked =
true;
- 961 int number_peers = info[jss::peers].asInt();
- 962 std::string server_state = info[jss::server_state].asString();
- 963 auto load_factor = info[jss::load_factor_server].asDouble() /
- 964 info[jss::load_base].asDouble();
-
- 966 enum { healthy, warning, critical };
- 967 int health = healthy;
- 968 auto set_health = [&health](
int state) {
-
-
-
-
-
- 974 if (last_validated_ledger_age >= 7 || last_validated_ledger_age < 0)
-
- 976 msg.body()[jss::info][jss::validated_ledger] =
- 977 last_validated_ledger_age;
- 978 if (last_validated_ledger_age < 20)
-
-
- 981 set_health(critical);
-
-
- 984 if (amendment_blocked)
-
- 986 msg.body()[jss::info][jss::amendment_blocked] =
true;
- 987 set_health(critical);
-
-
- 990 if (number_peers <= 7)
-
- 992 msg.body()[jss::info][jss::peers] = number_peers;
- 993 if (number_peers != 0)
-
-
- 996 set_health(critical);
-
-
- 999 if (!(server_state ==
"full" || server_state ==
"validating" ||
- 1000 server_state ==
"proposing"))
-
- 1002 msg.body()[jss::info][jss::server_state] = server_state;
- 1003 if (server_state ==
"syncing" || server_state ==
"tracking" ||
- 1004 server_state ==
"connected")
-
- 1006 set_health(warning);
-
-
- 1009 set_health(critical);
-
-
- 1012 if (load_factor > 100)
-
- 1014 msg.body()[jss::info][jss::load_factor] = load_factor;
- 1015 if (load_factor < 1000)
- 1016 set_health(warning);
-
- 1018 set_health(critical);
-
-
-
-
-
- 1024 msg.result(boost::beast::http::status::ok);
-
-
- 1027 msg.result(boost::beast::http::status::service_unavailable);
+
+
+
+
+
+
+ 926 return fail(boost::beast::http::status::not_found);
+
+
+
+ 930 return fail(boost::beast::http::status::bad_request);
+
+
+
+ 934 msg.result(boost::beast::http::status::ok);
+
+
+
+ 938 msg.prepare_payload();
+ 939 handoff.
response = std::make_shared<SimpleWriter>(msg);
+
+
+
+
+
+
+
+ 947 if (req.target() !=
"/health")
+
+ 949 boost::beast::http::response<json_body> msg;
+ 950 msg.version(req.version());
+
+ 952 msg.insert(
"Content-Type",
"application/json");
+ 953 msg.insert(
"Connection",
"close");
+
+
+
+ 957 int last_validated_ledger_age = -1;
+ 958 if (info.isMember(jss::validated_ledger))
+ 959 last_validated_ledger_age =
+ 960 info[jss::validated_ledger][jss::age].asInt();
+ 961 bool amendment_blocked =
false;
+ 962 if (info.isMember(jss::amendment_blocked))
+ 963 amendment_blocked =
true;
+ 964 int number_peers = info[jss::peers].asInt();
+ 965 std::string server_state = info[jss::server_state].asString();
+ 966 auto load_factor = info[jss::load_factor_server].asDouble() /
+ 967 info[jss::load_base].asDouble();
+
+ 969 enum { healthy, warning, critical };
+ 970 int health = healthy;
+ 971 auto set_health = [&health](
int state) {
+
+
+
+
+
+ 977 if (last_validated_ledger_age >= 7 || last_validated_ledger_age < 0)
+
+ 979 msg.body()[jss::info][jss::validated_ledger] =
+ 980 last_validated_ledger_age;
+ 981 if (last_validated_ledger_age < 20)
+
+
+ 984 set_health(critical);
+
+
+ 987 if (amendment_blocked)
+
+ 989 msg.body()[jss::info][jss::amendment_blocked] =
true;
+ 990 set_health(critical);
+
+
+ 993 if (number_peers <= 7)
+
+ 995 msg.body()[jss::info][jss::peers] = number_peers;
+ 996 if (number_peers != 0)
+
+
+ 999 set_health(critical);
+
+
+ 1002 if (!(server_state ==
"full" || server_state ==
"validating" ||
+ 1003 server_state ==
"proposing"))
+
+ 1005 msg.body()[jss::info][jss::server_state] = server_state;
+ 1006 if (server_state ==
"syncing" || server_state ==
"tracking" ||
+ 1007 server_state ==
"connected")
+
+ 1009 set_health(warning);
+
+
+ 1012 set_health(critical);
+
+
+ 1015 if (load_factor > 100)
+
+ 1017 msg.body()[jss::info][jss::load_factor] = load_factor;
+ 1018 if (load_factor < 1000)
+ 1019 set_health(warning);
+
+ 1021 set_health(critical);
+
+
+
+
+
+ 1027 msg.result(boost::beast::http::status::ok);
-
- 1030 msg.result(boost::beast::http::status::internal_server_error);
+
+ 1030 msg.result(boost::beast::http::status::service_unavailable);
-
-
- 1034 msg.prepare_payload();
- 1035 handoff.
response = std::make_shared<SimpleWriter>(msg);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 1033 msg.result(boost::beast::http::status::internal_server_error);
+
+
+
+ 1037 msg.prepare_payload();
+ 1038 handoff.
response = std::make_shared<SimpleWriter>(msg);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 1070 active =
ids_.size();
- 1071 disabled = enabledInSkip = 0;
-
-
-
-
- 1076 for (
auto& [
id, w] :
ids_)
-
- 1078 if (p = w.lock(); p !=
nullptr)
-
- 1080 bool const reduceRelayEnabled = p->txReduceRelayEnabled();
-
- 1082 if (!reduceRelayEnabled)
-
-
- 1085 if (toSkip.
count(
id) == 0)
-
- 1087 else if (reduceRelayEnabled)
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1073 active =
ids_.size();
+ 1074 disabled = enabledInSkip = 0;
+
+
+
+
+ 1079 for (
auto& [
id, w] :
ids_)
+
+ 1081 if (p = w.lock(); p !=
nullptr)
+
+ 1083 bool const reduceRelayEnabled = p->txReduceRelayEnabled();
+
+ 1085 if (!reduceRelayEnabled)
+
+
+ 1088 if (toSkip.
count(
id) == 0)
+
+ 1090 else if (reduceRelayEnabled)
+
+
+
-
-
-
-
-
-
-
-
-
-
-
- 1106 auto const iter =
ids_.find(
id);
- 1107 if (iter !=
ids_.end())
- 1108 return iter->second.lock();
-
-
-
-
-
-
-
-
-
-
-
- 1120 for (
auto const& e :
ids_)
-
- 1122 if (peer = e.second.lock(); peer !=
nullptr)
-
- 1124 if (peer->getNodePublic() == pubKey)
-
-
-
-
-
-
-
-
-
- 1134 auto const sm = std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER);
-
-
-
-
-
- 1140 protocol::TMProposeSet& m,
-
-
-
-
-
-
- 1147 std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER, validator);
-
- 1149 if (toSkip->find(p->id()) == toSkip->end())
-
-
-
-
-
-
-
-
-
-
- 1160 auto const sm = std::make_shared<Message>(m, protocol::mtVALIDATION);
-
-
-
-
-
- 1166 protocol::TMValidation& m,
-
-
-
-
-
-
- 1173 std::make_shared<Message>(m, protocol::mtVALIDATION, validator);
-
- 1175 if (toSkip->find(p->id()) == toSkip->end())
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1191 protocol::TMManifests
tm;
-
-
-
-
- 1196 tm.add_list()->set_stobject(
-
- 1198 hr.addSuppression(
manifest.hash());
-
-
-
-
- 1203 if (
tm.list_size() != 0)
-
- 1205 std::make_shared<Message>(
tm, protocol::mtMANIFESTS);
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1109 auto const iter =
ids_.find(
id);
+ 1110 if (iter !=
ids_.end())
+ 1111 return iter->second.lock();
+
+
+
+
+
+
+
+
+
+
+
+ 1123 for (
auto const& e :
ids_)
+
+ 1125 if (peer = e.second.lock(); peer !=
nullptr)
+
+ 1127 if (peer->getNodePublic() == pubKey)
+
+
+
+
+
+
+
+
+
+ 1137 auto const sm = std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER);
+
+
+
+
+
+ 1143 protocol::TMProposeSet& m,
+
+
+
+
+
+
+ 1150 std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER, validator);
+
+ 1152 if (toSkip->find(p->id()) == toSkip->end())
+
+
+
+
+
+
+
+
+
+
+ 1163 auto const sm = std::make_shared<Message>(m, protocol::mtVALIDATION);
+
+
+
+
+
+ 1169 protocol::TMValidation& m,
+
+
+
+
+
+
+ 1176 std::make_shared<Message>(m, protocol::mtVALIDATION, validator);
+
+ 1178 if (toSkip->find(p->id()) == toSkip->end())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1194 protocol::TMManifests
tm;
+
+
+
+
+ 1199 tm.add_list()->set_stobject(
+
+ 1201 hr.addSuppression(
manifest.hash());
+
+
+
+
+ 1206 if (
tm.list_size() != 0)
+
+ 1208 std::make_shared<Message>(
tm, protocol::mtMANIFESTS);
-
-
+
+
-
-
-
-
-
-
- 1219 bool relay = tx.has_value();
-
-
- 1222 auto& txn = tx->get();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1239 <<
"not relaying tx, total peers " << peers.
size();
- 1240 for (
auto const& p : peers)
- 1241 p->addTxQueue(
hash);
-
-
-
- 1245 auto& txn = tx->get();
- 1246 auto const sm = std::make_shared<Message>(txn, protocol::mtTRANSACTION);
-
-
-
-
-
- 1252 for (
auto const& p : peers)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1268 if (enabledTarget > enabledInSkip)
-
+
+
+
+
+
+
+
+
+
+ 1222 bool relay = tx.has_value();
+
+
+ 1225 auto& txn = tx->get();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1242 <<
"not relaying tx, total peers " << peers.
size();
+ 1243 for (
auto const& p : peers)
+ 1244 p->addTxQueue(
hash);
+
+
+
+ 1248 auto& txn = tx->get();
+ 1249 auto const sm = std::make_shared<Message>(txn, protocol::mtTRANSACTION);
+
+
+
+
+
+ 1255 for (
auto const& p : peers)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- 1272 <<
" selected " << enabledTarget <<
" skip "
- 1273 << toSkip.
size() <<
" disabled " << disabled;
-
-
-
- 1277 for (
auto const& p : peers)
-
-
- 1280 if (!p->txReduceRelayEnabled())
-
-
-
- 1284 else if (enabledAndRelayed < enabledTarget)
-
- 1286 enabledAndRelayed++;
-
-
-
-
- 1291 p->addTxQueue(
hash);
-
-
-
-
-
-
-
-
-
-
- 1302 list_.erase(&child);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1323 work_ = std::nullopt;
-
-
- 1326 for (
auto const& element :
list_)
-
-
-
-
-
- 1332 for (
auto const& child : children)
-
- 1334 if (child !=
nullptr)
-
-
-
-
-
-
-
-
- 1343 for (
auto addr : result)
-
-
-
-
-
-
- 1350 auto const result =
m_peerFinder->buildEndpointsForPeers();
- 1351 for (
auto const& e : result)
-
-
-
-
- 1356 auto const iter =
m_peers.find(e.first);
-
- 1358 peer = iter->second.lock();
-
-
- 1361 peer->sendEndpoints(e.second.begin(), e.second.end());
-
-
-
-
-
-
-
- 1369 if (p->txReduceRelayEnabled())
-
-
-
-
-
-
-
-
-
-
- 1380 protocol::TMSquelch m;
-
- 1382 m.set_validatorpubkey(validator.data(), validator.size());
-
- 1384 m.set_squelchduration(squelchDuration);
- 1385 return std::make_shared<Message>(m, protocol::mtSQUELCH);
-
-
-
-
-
-
- 1392 peer &&
app_.
config().VP_REDUCE_RELAY_SQUELCH)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1407 peer &&
app_.
config().VP_REDUCE_RELAY_SQUELCH)
-
-
-
-
-
-
-
-
-
-
- 1418 protocol::MessageType type)
-
- 1420 if (!
strand_.running_in_this_thread())
-
-
- 1423 [
this, key, validator, peers = std::move(peers), type]()
mutable {
-
-
-
- 1427 for (
auto id : peers)
- 1428 slots_.updateSlotAndSquelch(key, validator,
id, type);
-
-
-
-
-
-
-
- 1436 protocol::MessageType type)
-
- 1438 if (!
strand_.running_in_this_thread())
- 1439 return post(
strand_, [
this, key, validator, peer, type]() {
-
-
-
- 1443 slots_.updateSlotAndSquelch(key, validator, peer, type);
-
+ 1271 if (enabledTarget > enabledInSkip)
+
+
+
+ 1275 <<
" selected " << enabledTarget <<
" skip "
+ 1276 << toSkip.
size() <<
" disabled " << disabled;
+
+
+
+ 1280 for (
auto const& p : peers)
+
+
+ 1283 if (!p->txReduceRelayEnabled())
+
+
+
+ 1287 else if (enabledAndRelayed < enabledTarget)
+
+ 1289 enabledAndRelayed++;
+
+
+
+
+ 1294 p->addTxQueue(
hash);
+
+
+
+
+
+
+
+
+
+
+ 1305 list_.erase(&child);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1326 work_ = std::nullopt;
+
+
+ 1329 for (
auto const& element :
list_)
+
+
+
+
+
+ 1335 for (
auto const& child : children)
+
+ 1337 if (child !=
nullptr)
+
+
+
+
+
+
+
+
+ 1346 for (
auto addr : result)
+
+
+
+
+
+
+ 1353 auto const result =
m_peerFinder->buildEndpointsForPeers();
+ 1354 for (
auto const& e : result)
+
+
+
+
+ 1359 auto const iter =
m_peers.find(e.first);
+
+ 1361 peer = iter->second.lock();
+
+
+ 1364 peer->sendEndpoints(e.second.begin(), e.second.end());
+
+
+
+
+
+
+
+ 1372 if (p->txReduceRelayEnabled())
+
+
+
+
+
+
+
+
+
+
+ 1383 protocol::TMSquelch m;
+
+ 1385 m.set_validatorpubkey(validator.data(), validator.size());
+
+ 1387 m.set_squelchduration(squelchDuration);
+ 1388 return std::make_shared<Message>(m, protocol::mtSQUELCH);
+
+
+
+
+
+
+ 1395 peer &&
app_.
config().VP_REDUCE_RELAY_SQUELCH)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1410 peer &&
app_.
config().VP_REDUCE_RELAY_SQUELCH)
+
+
+
+
+
+
+
+
+
+
+ 1421 protocol::MessageType type)
+
+ 1423 if (!
strand_.running_in_this_thread())
+
+
+ 1426 [
this, key, validator, peers = std::move(peers), type]()
mutable {
+
+
+
+ 1430 for (
auto id : peers)
+ 1431 slots_.updateSlotAndSquelch(key, validator,
id, type);
+
+
+
+
+
+
+
+ 1439 protocol::MessageType type)
+
+ 1441 if (!
strand_.running_in_this_thread())
+ 1442 return post(
strand_, [
this, key, validator, peer, type]() {
+
+
-
-
-
- 1449 if (!
strand_.running_in_this_thread())
-
-
- 1452 slots_.deletePeer(
id,
true);
-
+ 1446 slots_.updateSlotAndSquelch(key, validator, peer, type);
+
+
+
+
+
+ 1452 if (!
strand_.running_in_this_thread())
+
-
-
-
- 1458 if (!
strand_.running_in_this_thread())
-
-
- 1461 slots_.deleteIdlePeers();
-
+ 1455 slots_.deletePeer(
id,
true);
+
+
+
+
+
+ 1461 if (!
strand_.running_in_this_thread())
+
-
-
-
-
-
-
-
-
- 1472 auto const& section = config.
section(
"overlay");
-
-
-
-
- 1477 Throw<std::runtime_error>(
"Configured IP limit is invalid");
-
-
- 1480 set(ip,
"public_ip", section);
-
-
- 1483 boost::system::error_code ec;
- 1484 setup.
public_ip = beast::IP::Address::from_string(ip, ec);
-
- 1486 Throw<std::runtime_error>(
"Configured public IP is invalid");
-
-
-
-
- 1491 auto const& section = config.
section(
"crawl");
- 1492 auto const& values = section.
values();
-
- 1494 if (values.size() > 1)
-
- 1496 Throw<std::runtime_error>(
- 1497 "Configured [crawl] section is invalid, too many values");
-
-
- 1500 bool crawlEnabled =
true;
-
-
- 1503 if (values.size() == 1)
-
-
-
- 1507 crawlEnabled = boost::lexical_cast<bool>(values.front());
-
- 1509 catch (boost::bad_lexical_cast
const&)
-
- 1511 Throw<std::runtime_error>(
- 1512 "Configured [crawl] section has invalid value: " +
-
-
-
-
-
-
- 1519 if (get<bool>(section,
"overlay",
true))
-
-
-
- 1523 if (get<bool>(section,
"server",
true))
-
-
-
- 1527 if (get<bool>(section,
"counts",
false))
-
-
-
- 1531 if (get<bool>(section,
"unl",
true))
-
-
-
-
-
-
- 1538 auto const& section = config.
section(
"vl");
-
-
-
+ 1464 slots_.deleteIdlePeers();
+
+
+
+
+
+
+
+
+
+
+ 1475 auto const& section = config.
section(
"overlay");
+
+
+
+
+ 1480 Throw<std::runtime_error>(
"Configured IP limit is invalid");
+
+
+ 1483 set(ip,
"public_ip", section);
+
+
+ 1486 boost::system::error_code ec;
+ 1487 setup.
public_ip = beast::IP::Address::from_string(ip, ec);
+
+ 1489 Throw<std::runtime_error>(
"Configured public IP is invalid");
+
+
+
+
+ 1494 auto const& section = config.
section(
"crawl");
+ 1495 auto const& values = section.
values();
+
+ 1497 if (values.size() > 1)
+
+ 1499 Throw<std::runtime_error>(
+ 1500 "Configured [crawl] section is invalid, too many values");
+
+
+ 1503 bool crawlEnabled =
true;
+
+
+ 1506 if (values.size() == 1)
+
+
+
+ 1510 crawlEnabled = boost::lexical_cast<bool>(values.front());
+
+ 1512 catch (boost::bad_lexical_cast
const&)
+
+ 1514 Throw<std::runtime_error>(
+ 1515 "Configured [crawl] section has invalid value: " +
+
+
+
+
+
+
+ 1522 if (get<bool>(section,
"overlay",
true))
+
+
+
+ 1526 if (get<bool>(section,
"server",
true))
+
+
+
+ 1530 if (get<bool>(section,
"counts",
false))
+
+
+
+ 1534 if (get<bool>(section,
"unl",
true))
+
+
+
+
+
+
+ 1541 auto const& section = config.
section(
"vl");
-
-
- 1545 auto id = config.
legacy(
"network_id");
-
-
-
-
-
-
- 1552 if (
id ==
"testnet")
-
+
+
+
+
+
+ 1548 auto id = config.
legacy(
"network_id");
+
+
+
+
+
-
-
+ 1555 if (
id ==
"testnet")
+
- 1558 setup.
networkID = beast::lexicalCastThrow<std::uint32_t>(
id);
-
-
-
-
- 1563 Throw<std::runtime_error>(
- 1564 "Configured [network_id] section is invalid: must be a number "
- 1565 "or one of the strings 'main', 'testnet' or 'devnet'.");
-
-
-
-
+
+
+
+ 1561 setup.
networkID = beast::lexicalCastThrow<std::uint32_t>(
id);
+
+
+
+
+ 1566 Throw<std::runtime_error>(
+ 1567 "Configured [network_id] section is invalid: must be a number "
+ 1568 "or one of the strings 'main', 'testnet' or 'devnet'.");
+
-
-
-
-
-
-
-
- 1578 boost::asio::io_service& io_service,
-
-
-
- 1582 return std::make_unique<OverlayImpl>(
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 1581 boost::asio::io_service& io_service,
+
+
+
+ 1585 return std::make_unique<OverlayImpl>(
+
+
+
+
+
+
+
+
+
+
+
@@ -1716,79 +1719,79 @@ $(function() {
Child(OverlayImpl &overlay)
boost::system::error_code error_code
-Json::Value getUnlInfo()
Returns information about the local server's UNL.
-
+Json::Value getUnlInfo()
Returns information about the local server's UNL.
+
static std::string makePrefix(std::uint32_t id)
PeerFinder::Manager & peerFinder()
boost::asio::ip::tcp::endpoint endpoint_type
-bool processHealth(http_request_type const &req, Handoff &handoff)
Handles health requests.
+bool processHealth(http_request_type const &req, Handoff &handoff)
Handles health requests.
boost::asio::ip::address address_type
static bool is_upgrade(boost::beast::http::header< true, Fields > const &req)
std::condition_variable_any cond_
-void onWrite(beast::PropertyStream::Map &stream) override
Subclass override.
-void deleteIdlePeers()
Check if peers stopped relaying messages and if slots stopped receiving messages from the validator.
+void onWrite(beast::PropertyStream::Map &stream) override
Subclass override.
+void deleteIdlePeers()
Check if peers stopped relaying messages and if slots stopped receiving messages from the validator.
-void reportTraffic(TrafficCount::category cat, bool isInbound, int bytes)
-void activate(std::shared_ptr< PeerImp > const &peer)
Called when a peer has connected successfully This is called after the peer handshake has been comple...
-PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
+void reportTraffic(TrafficCount::category cat, bool isInbound, int bytes)
+void activate(std::shared_ptr< PeerImp > const &peer)
Called when a peer has connected successfully This is called after the peer handshake has been comple...
+PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
hash_map< std::shared_ptr< PeerFinder::Slot >, std::weak_ptr< PeerImp > > m_peers
void add_active(std::shared_ptr< PeerImp > const &peer)
-std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
+std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Resource::Manager & m_resourceManager
-
+
std::shared_ptr< Message > manifestMessage_
std::optional< std::uint32_t > manifestListSeq_
-void squelch(PublicKey const &validator, Peer::id_t const id, std::uint32_t squelchDuration) const override
Squelch handler.
+void squelch(PublicKey const &validator, Peer::id_t const id, std::uint32_t squelchDuration) const override
Squelch handler.
std::shared_ptr< Writer > makeErrorResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address, std::string msg)
reduce_relay::Slots< UptimeClock > slots_
-void deletePeer(Peer::id_t id)
Called when the peer is deleted.
-std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) const override
Returns the peer with the matching short id, or null.
+void deletePeer(Peer::id_t id)
Called when the peer is deleted.
+std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) const override
Returns the peer with the matching short id, or null.
std::atomic< Peer::id_t > next_id_
boost::asio::io_service & io_service_
std::weak_ptr< Timer > timer_
metrics::TxMetrics txMetrics_
-void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
-void onPeerDeactivate(Peer::id_t id)
+void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
+void onPeerDeactivate(Peer::id_t id)
-bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
+bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
std::recursive_mutex mutex_
-
+
void remove(std::shared_ptr< PeerFinder::Slot > const &slot)
-void sendTxQueue()
Send once a second transactions' hashes aggregated by peers.
+void sendTxQueue()
Send once a second transactions' hashes aggregated by peers.
-std::set< Peer::id_t > relay(protocol::TMProposeSet &m, uint256 const &uid, PublicKey const &validator) override
Relay a proposal.
-std::size_t size() const override
The number of active peers on the network Active peers are only those peers that have completed the h...
-void unsquelch(PublicKey const &validator, Peer::id_t id) const override
Unsquelch handler.
+std::set< Peer::id_t > relay(protocol::TMProposeSet &m, uint256 const &uid, PublicKey const &validator) override
Relay a proposal.
+std::size_t size() const override
The number of active peers on the network Active peers are only those peers that have completed the h...
+void unsquelch(PublicKey const &validator, Peer::id_t id) const override
Unsquelch handler.
std::shared_ptr< Writer > makeRedirectResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address)
void for_each(UnaryFunc &&f) const
std::optional< boost::asio::io_service::work > work_
-Json::Value getOverlayInfo()
Returns information about peers on the overlay network.
+Json::Value getOverlayInfo()
Returns information about peers on the overlay network.
Resource::Manager & resourceManager()
static bool isPeerUpgrade(http_request_type const &request)
-Json::Value getServerCounts()
Returns information about the local server's performance counters.
+Json::Value getServerCounts()
Returns information about the local server's performance counters.
boost::asio::io_service::strand strand_
-void onManifests(std::shared_ptr< protocol::TMManifests > const &m, std::shared_ptr< PeerImp > const &from)
+void onManifests(std::shared_ptr< protocol::TMManifests > const &m, std::shared_ptr< PeerImp > const &from)
std::unique_ptr< PeerFinder::Manager > m_peerFinder
void connect(beast::IP::Endpoint const &remote_endpoint) override
Establish a peer connection to the specified endpoint.
Handoff onHandoff(std::unique_ptr< stream_type > &&bundle, http_request_type &&request, endpoint_type remote_endpoint) override
Conditionally accept an incoming HTTP request.
Setup const & setup() const
-
-std::shared_ptr< Message > getManifestsMessage()
+
+std::shared_ptr< Message > getManifestsMessage()
hash_map< Peer::id_t, std::weak_ptr< PeerImp > > ids_
-Json::Value getServerInfo()
Returns information about the local server.
-bool processValidatorList(http_request_type const &req, Handoff &handoff)
Handles validator list requests.
-Json::Value json() override
Return diagnostics on the status of all peers.
-void checkTracking(std::uint32_t) override
Calls the checkTracking function on each peer.
+Json::Value getServerInfo()
Returns information about the local server.
+bool processValidatorList(http_request_type const &req, Handoff &handoff)
Handles validator list requests.
+Json::Value json() override
Return diagnostics on the status of all peers.
+void checkTracking(std::uint32_t) override
Calls the checkTracking function on each peer.
ServerHandler & serverHandler_
-bool processCrawl(http_request_type const &req, Handoff &handoff)
Handles crawl requests.
+bool processCrawl(http_request_type const &req, Handoff &handoff)
Handles crawl requests.
-int limit() override
Returns the maximum number of peers we are configured to allow.
-void updateSlotAndSquelch(uint256 const &key, PublicKey const &validator, std::set< Peer::id_t > &&peers, protocol::MessageType type)
Updates message count for validator/peer.
+int limit() override
Returns the maximum number of peers we are configured to allow.
+void updateSlotAndSquelch(uint256 const &key, PublicKey const &validator, std::set< Peer::id_t > &&peers, protocol::MessageType type)
Updates message count for validator/peer.
OverlayImpl(Application &app, Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
beast::Journal const journal_
boost::container::flat_map< Child *, std::weak_ptr< Child > > list_
@@ -1851,7 +1854,7 @@ $(function() {
bool set(T &target, std::string const &name, Section const §ion)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
std::optional< uint256 > makeSharedValue(stream_type &ssl, beast::Journal journal)
Computes a shared value based on the SSL connection state.
std::shared_ptr< boost::asio::ssl::context > make_SSLContext(std::string const &cipherList)
Create a self-signed SSL context that allows anonymous Diffie Hellman.
-std::shared_ptr< Message > makeSquelchMessage(PublicKey const &validator, bool squelch, uint32_t squelchDuration)
+std::shared_ptr< Message > makeSquelchMessage(PublicKey const &validator, bool squelch, uint32_t squelchDuration)
std::string strHex(FwdIt begin, FwdIt end)
@ accepted
Manifest is valid.
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
@@ -1862,9 +1865,9 @@ $(function() {
std::string to_string(base_uint< Bits, Tag > const &a)
PublicKey verifyHandshake(boost::beast::http::fields const &headers, ripple::uint256 const &sharedValue, std::optional< std::uint32_t > networkID, beast::IP::Address public_ip, beast::IP::Address remote, Application &app)
Validate header fields necessary for upgrading the link to the peer protocol.
-Overlay::Setup setup_Overlay(BasicConfig const &config)
+Overlay::Setup setup_Overlay(BasicConfig const &config)
constexpr Number squelch(Number const &x, Number const &limit) noexcept
-std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Creates the implementation of Overlay.
+std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Creates the implementation of Overlay.
beast::xor_shift_engine & default_prng()
Return the default random engine.
diff --git a/OverlayImpl_8h_source.html b/OverlayImpl_8h_source.html
index 83ed1bbd9e..dce3c12948 100644
--- a/OverlayImpl_8h_source.html
+++ b/OverlayImpl_8h_source.html
@@ -647,38 +647,38 @@ $(function() {
boost::system::error_code error_code
-Json::Value getUnlInfo()
Returns information about the local server's UNL.
-
+Json::Value getUnlInfo()
Returns information about the local server's UNL.
+
static std::string makePrefix(std::uint32_t id)
PeerFinder::Manager & peerFinder()
boost::asio::ip::tcp::endpoint endpoint_type
std::atomic< uint64_t > peerDisconnects_
-bool processHealth(http_request_type const &req, Handoff &handoff)
Handles health requests.
+bool processHealth(http_request_type const &req, Handoff &handoff)
Handles health requests.
boost::asio::ip::address address_type
static bool is_upgrade(boost::beast::http::header< true, Fields > const &req)
std::condition_variable_any cond_
-void onWrite(beast::PropertyStream::Map &stream) override
Subclass override.
+void onWrite(beast::PropertyStream::Map &stream) override
Subclass override.
Json::Value txMetrics() const override
Returns tx reduce-relay metrics.
-void deleteIdlePeers()
Check if peers stopped relaying messages and if slots stopped receiving messages from the validator.
+void deleteIdlePeers()
Check if peers stopped relaying messages and if slots stopped receiving messages from the validator.
-void reportTraffic(TrafficCount::category cat, bool isInbound, int bytes)
-void activate(std::shared_ptr< PeerImp > const &peer)
Called when a peer has connected successfully This is called after the peer handshake has been comple...
-PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
+void reportTraffic(TrafficCount::category cat, bool isInbound, int bytes)
+void activate(std::shared_ptr< PeerImp > const &peer)
Called when a peer has connected successfully This is called after the peer handshake has been comple...
+PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
hash_map< std::shared_ptr< PeerFinder::Slot >, std::weak_ptr< PeerImp > > m_peers
void add_active(std::shared_ptr< PeerImp > const &peer)
-std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
+std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Resource::Manager & m_resourceManager
-
+
std::shared_ptr< Message > manifestMessage_
std::optional< std::uint32_t > manifestListSeq_
OverlayImpl & operator=(OverlayImpl const &)=delete
-void squelch(PublicKey const &validator, Peer::id_t const id, std::uint32_t squelchDuration) const override
Squelch handler.
+void squelch(PublicKey const &validator, Peer::id_t const id, std::uint32_t squelchDuration) const override
Squelch handler.
std::shared_ptr< Writer > makeErrorResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address, std::string msg)
reduce_relay::Slots< UptimeClock > slots_
-void deletePeer(Peer::id_t id)
Called when the peer is deleted.
-std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) const override
Returns the peer with the matching short id, or null.
+void deletePeer(Peer::id_t id)
Called when the peer is deleted.
+std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) const override
Returns the peer with the matching short id, or null.
std::atomic< Peer::id_t > next_id_
void incPeerDisconnect() override
Increment and retrieve counters for total peer disconnects, and disconnects we initiate for excessive...
boost::asio::io_service & io_service_
@@ -689,53 +689,53 @@ $(function() {
std::weak_ptr< Timer > timer_
std::atomic< uint64_t > jqTransOverflow_
metrics::TxMetrics txMetrics_
-void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
-void onPeerDeactivate(Peer::id_t id)
+void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
+void onPeerDeactivate(Peer::id_t id)
-bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
+bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
std::recursive_mutex mutex_
std::uint64_t getPeerDisconnectCharges() const override
-
+
boost::asio::ip::tcp::socket socket_type
void remove(std::shared_ptr< PeerFinder::Slot > const &slot)
-void sendTxQueue()
Send once a second transactions' hashes aggregated by peers.
+void sendTxQueue()
Send once a second transactions' hashes aggregated by peers.
-std::set< Peer::id_t > relay(protocol::TMProposeSet &m, uint256 const &uid, PublicKey const &validator) override
Relay a proposal.
-std::size_t size() const override
The number of active peers on the network Active peers are only those peers that have completed the h...
-void unsquelch(PublicKey const &validator, Peer::id_t id) const override
Unsquelch handler.
+std::set< Peer::id_t > relay(protocol::TMProposeSet &m, uint256 const &uid, PublicKey const &validator) override
Relay a proposal.
+std::size_t size() const override
The number of active peers on the network Active peers are only those peers that have completed the h...
+void unsquelch(PublicKey const &validator, Peer::id_t id) const override
Unsquelch handler.
std::shared_ptr< Writer > makeRedirectResponse(std::shared_ptr< PeerFinder::Slot > const &slot, http_request_type const &request, address_type remote_address)
void for_each(UnaryFunc &&f) const
static bool isPeerUpgrade(boost::beast::http::response< Body > const &response)
std::optional< boost::asio::io_service::work > work_
OverlayImpl(OverlayImpl const &)=delete
-Json::Value getOverlayInfo()
Returns information about peers on the overlay network.
+Json::Value getOverlayInfo()
Returns information about peers on the overlay network.
Resource::Manager & resourceManager()
static bool isPeerUpgrade(http_request_type const &request)
-Json::Value getServerCounts()
Returns information about the local server's performance counters.
+Json::Value getServerCounts()
Returns information about the local server's performance counters.
boost::asio::io_service::strand strand_
-void onManifests(std::shared_ptr< protocol::TMManifests > const &m, std::shared_ptr< PeerImp > const &from)
+void onManifests(std::shared_ptr< protocol::TMManifests > const &m, std::shared_ptr< PeerImp > const &from)
std::unique_ptr< PeerFinder::Manager > m_peerFinder
std::uint64_t getJqTransOverflow() const override
void connect(beast::IP::Endpoint const &remote_endpoint) override
Establish a peer connection to the specified endpoint.
Handoff onHandoff(std::unique_ptr< stream_type > &&bundle, http_request_type &&request, endpoint_type remote_endpoint) override
Conditionally accept an incoming HTTP request.
Setup const & setup() const
-
+
std::atomic< uint64_t > peerDisconnectsCharges_
-std::shared_ptr< Message > getManifestsMessage()
+std::shared_ptr< Message > getManifestsMessage()
hash_map< Peer::id_t, std::weak_ptr< PeerImp > > ids_
-Json::Value getServerInfo()
Returns information about the local server.
-bool processValidatorList(http_request_type const &req, Handoff &handoff)
Handles validator list requests.
-Json::Value json() override
Return diagnostics on the status of all peers.
+Json::Value getServerInfo()
Returns information about the local server.
+bool processValidatorList(http_request_type const &req, Handoff &handoff)
Handles validator list requests.
+Json::Value json() override
Return diagnostics on the status of all peers.
-void checkTracking(std::uint32_t) override
Calls the checkTracking function on each peer.
+void checkTracking(std::uint32_t) override
Calls the checkTracking function on each peer.
void incPeerDisconnectCharges() override
ServerHandler & serverHandler_
-bool processCrawl(http_request_type const &req, Handoff &handoff)
Handles crawl requests.
+bool processCrawl(http_request_type const &req, Handoff &handoff)
Handles crawl requests.
static bool is_upgrade(boost::beast::http::header< false, Fields > const &req)
-int limit() override
Returns the maximum number of peers we are configured to allow.
-void updateSlotAndSquelch(uint256 const &key, PublicKey const &validator, std::set< Peer::id_t > &&peers, protocol::MessageType type)
Updates message count for validator/peer.
+int limit() override
Returns the maximum number of peers we are configured to allow.
+void updateSlotAndSquelch(uint256 const &key, PublicKey const &validator, std::set< Peer::id_t > &&peers, protocol::MessageType type)
Updates message count for validator/peer.
void incJqTransOverflow() override
Increment and retrieve counter for transaction job queue overflows.
beast::Journal const journal_
boost::container::flat_map< Child *, std::weak_ptr< Child > > list_
diff --git a/PeerImp_8cpp_source.html b/PeerImp_8cpp_source.html
index 658f9061bb..93486d14c3 100644
--- a/PeerImp_8cpp_source.html
+++ b/PeerImp_8cpp_source.html
@@ -3619,18 +3619,18 @@ $(function() {
virtual bool isNeedNetworkLedger()=0
PeerFinder::Manager & peerFinder()
-void reportTraffic(TrafficCount::category cat, bool isInbound, int bytes)
-void activate(std::shared_ptr< PeerImp > const &peer)
Called when a peer has connected successfully This is called after the peer handshake has been comple...
-void deletePeer(Peer::id_t id)
Called when the peer is deleted.
+void reportTraffic(TrafficCount::category cat, bool isInbound, int bytes)
+void activate(std::shared_ptr< PeerImp > const &peer)
Called when a peer has connected successfully This is called after the peer handshake has been comple...
+void deletePeer(Peer::id_t id)
Called when the peer is deleted.
void incPeerDisconnect() override
Increment and retrieve counters for total peer disconnects, and disconnects we initiate for excessive...
void addTxMetrics(Args... args)
Add tx reduce-relay metrics.
-void onPeerDeactivate(Peer::id_t id)
+void onPeerDeactivate(Peer::id_t id)
void remove(std::shared_ptr< PeerFinder::Slot > const &slot)
void for_each(UnaryFunc &&f) const
Resource::Manager & resourceManager()
-void onManifests(std::shared_ptr< protocol::TMManifests > const &m, std::shared_ptr< PeerImp > const &from)
+void onManifests(std::shared_ptr< protocol::TMManifests > const &m, std::shared_ptr< PeerImp > const &from)
Setup const & setup() const
-std::shared_ptr< Message > getManifestsMessage()
+std::shared_ptr< Message > getManifestsMessage()
void incPeerDisconnectCharges() override
void incJqTransOverflow() override
Increment and retrieve counter for transaction job queue overflows.
virtual void on_endpoints(std::shared_ptr< Slot > const &slot, Endpoints const &endpoints)=0
Called when mtENDPOINTS is received.
diff --git a/ServerHandler_8cpp_source.html b/ServerHandler_8cpp_source.html
index 0a74cee7ea..4288cb01a2 100644
--- a/ServerHandler_8cpp_source.html
+++ b/ServerHandler_8cpp_source.html
@@ -1508,7 +1508,7 @@ $(function() {
static void setup_Client(ServerHandler::Setup &setup)
std::shared_ptr< boost::asio::ssl::context > make_SSLContextAuthed(std::string const &keyFile, std::string const &certFile, std::string const &chainFile, std::string const &cipherList)
Create an authenticated SSL context using the specified files.
std::unique_ptr< Server > make_Server(Handler &handler, boost::asio::io_service &io_service, beast::Journal journal)
Create the HTTP server using the specified handler.
-Overlay::Setup setup_Overlay(BasicConfig const &config)
+Overlay::Setup setup_Overlay(BasicConfig const &config)
diff --git a/classripple_1_1OverlayImpl.html b/classripple_1_1OverlayImpl.html
index 9f9d3772f3..5435cacc35 100644
--- a/classripple_1_1OverlayImpl.html
+++ b/classripple_1_1OverlayImpl.html
@@ -874,7 +874,7 @@ Private Attributes
Reimplemented from ripple::Overlay.
-Definition at line 559 of file OverlayImpl.cpp.
+Definition at line 562 of file OverlayImpl.cpp.
@@ -1043,7 +1043,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 710 of file OverlayImpl.cpp.
+Definition at line 713 of file OverlayImpl.cpp.
@@ -1074,7 +1074,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 703 of file OverlayImpl.cpp.
+Definition at line 706 of file OverlayImpl.cpp.
@@ -1105,7 +1105,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 826 of file OverlayImpl.cpp.
+Definition at line 829 of file OverlayImpl.cpp.
@@ -1137,7 +1137,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1048 of file OverlayImpl.cpp.
+Definition at line 1051 of file OverlayImpl.cpp.
@@ -1191,7 +1191,7 @@ Private Attributes
- Returns
- active peers less peers in toSkip
-Definition at line 1061 of file OverlayImpl.cpp.
+Definition at line 1064 of file OverlayImpl.cpp.
@@ -1229,7 +1229,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1096 of file OverlayImpl.cpp.
+Definition at line 1099 of file OverlayImpl.cpp.
@@ -1261,7 +1261,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1103 of file OverlayImpl.cpp.
+Definition at line 1106 of file OverlayImpl.cpp.
@@ -1293,7 +1293,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1115 of file OverlayImpl.cpp.
+Definition at line 1118 of file OverlayImpl.cpp.
@@ -1325,7 +1325,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1132 of file OverlayImpl.cpp.
+Definition at line 1135 of file OverlayImpl.cpp.
@@ -1357,7 +1357,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1158 of file OverlayImpl.cpp.
+Definition at line 1161 of file OverlayImpl.cpp.
@@ -1414,7 +1414,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1139 of file OverlayImpl.cpp.
+Definition at line 1142 of file OverlayImpl.cpp.
@@ -1471,7 +1471,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1165 of file OverlayImpl.cpp.
+Definition at line 1168 of file OverlayImpl.cpp.
@@ -1527,7 +1527,7 @@ Private Attributes
Implements ripple::Overlay.
-Definition at line 1214 of file OverlayImpl.cpp.
+Definition at line 1217 of file OverlayImpl.cpp.
@@ -1546,7 +1546,7 @@ Private Attributes
@@ -1610,7 +1610,7 @@ Private Attributes
A peer has connected successfully This is called after the peer handshake has been completed and during peer activation.
At this point, the peer address and the public key are known.
-Definition at line 601 of file OverlayImpl.cpp.
+Definition at line 604 of file OverlayImpl.cpp.
@@ -1630,7 +1630,7 @@ Private Attributes
@@ -1682,7 +1682,7 @@ template<class UnaryFunc >
@@ -1864,7 +1864,7 @@ template<class Fields >
@@ -2128,7 +2128,7 @@ template<class Fields >
-Definition at line 1414 of file OverlayImpl.cpp.
+Definition at line 1417 of file OverlayImpl.cpp.
@@ -2172,7 +2172,7 @@ template<class Fields >
Overload to reduce allocation in case of single peer.
-Definition at line 1432 of file OverlayImpl.cpp.
+Definition at line 1435 of file OverlayImpl.cpp.
@@ -2200,7 +2200,7 @@ template<class Fields >
-Definition at line 1447 of file OverlayImpl.cpp.
+Definition at line 1450 of file OverlayImpl.cpp.
@@ -2312,7 +2312,7 @@ template<typename... Args>
Implements ripple::reduce_relay::SquelchHandler.
-Definition at line 1401 of file OverlayImpl.cpp.
+Definition at line 1404 of file OverlayImpl.cpp.
@@ -2361,7 +2361,7 @@ template<typename... Args>
Implements ripple::reduce_relay::SquelchHandler.
-Definition at line 1389 of file OverlayImpl.cpp.
+Definition at line 1392 of file OverlayImpl.cpp.
@@ -2497,7 +2497,7 @@ template<typename... Args>
Crawl returns information about the node and its peers so crawlers can map the network.
- Returns
- true if the request was handled.
-Definition at line 837 of file OverlayImpl.cpp.
+Definition at line 840 of file OverlayImpl.cpp.
@@ -2539,7 +2539,7 @@ template<typename... Args>
Using a /vl/<hex-encoded public key> URL, will retrieve the latest valdiator list (or UNL) that this node has for that public key, if the node trusts that public key.
- Returns
- true if the request was handled.
-Definition at line 874 of file OverlayImpl.cpp.
+Definition at line 877 of file OverlayImpl.cpp.
@@ -2581,7 +2581,7 @@ template<typename... Args>
Health returns information about the health of the node.
- Returns
- true if the request was handled.
-Definition at line 942 of file OverlayImpl.cpp.
+Definition at line 945 of file OverlayImpl.cpp.
@@ -2622,7 +2622,7 @@ template<typename... Args>
Handles non-peer protocol requests.
- Returns
- true if the request was handled.
-Definition at line 1040 of file OverlayImpl.cpp.
+Definition at line 1043 of file OverlayImpl.cpp.
@@ -2652,7 +2652,7 @@ template<typename... Args>
Returns information about peers on the overlay network.
Reported through the /crawl API Controlled through the config section [crawl] overlay=[0|1]
-Definition at line 716 of file OverlayImpl.cpp.
+Definition at line 719 of file OverlayImpl.cpp.
@@ -2682,7 +2682,7 @@ template<typename... Args>
Returns information about the local server.
Reported through the /crawl API Controlled through the config section [crawl] server=[0|1]
-Definition at line 761 of file OverlayImpl.cpp.
+Definition at line 764 of file OverlayImpl.cpp.
@@ -2712,7 +2712,7 @@ template<typename... Args>
Returns information about the local server's performance counters.
Reported through the /crawl API Controlled through the config section [crawl] counts=[0|1]
-Definition at line 789 of file OverlayImpl.cpp.
+Definition at line 792 of file OverlayImpl.cpp.
@@ -2742,7 +2742,7 @@ template<typename... Args>
Returns information about the local server's UNL.
Reported through the /crawl API Controlled through the config section [crawl] unl=[0|1]
-Definition at line 795 of file OverlayImpl.cpp.
+Definition at line 798 of file OverlayImpl.cpp.
@@ -2775,7 +2775,7 @@ template<typename... Args>
Reimplemented from beast::PropertyStream::Source.
-Definition at line 576 of file OverlayImpl.cpp.
+Definition at line 579 of file OverlayImpl.cpp.
@@ -2803,7 +2803,7 @@ template<typename... Args>
@@ -2830,7 +2830,7 @@ template<typename... Args>
@@ -2857,7 +2857,7 @@ template<typename... Args>
@@ -2884,7 +2884,7 @@ template<typename... Args>
@@ -2913,7 +2913,7 @@ template<typename... Args>
Send once a second transactions' hashes aggregated by peers.
-Definition at line 1366 of file OverlayImpl.cpp.
+Definition at line 1369 of file OverlayImpl.cpp.
@@ -2942,7 +2942,7 @@ template<typename... Args>
Check if peers stopped relaying messages and if slots stopped receiving messages from the validator.
-Definition at line 1456 of file OverlayImpl.cpp.
+Definition at line 1459 of file OverlayImpl.cpp.
diff --git a/make__Overlay_8h_source.html b/make__Overlay_8h_source.html
index 4f95e8945e..99f7091499 100644
--- a/make__Overlay_8h_source.html
+++ b/make__Overlay_8h_source.html
@@ -125,8 +125,8 @@ $(function() {
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-Overlay::Setup setup_Overlay(BasicConfig const &config)
-std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Creates the implementation of Overlay.
+Overlay::Setup setup_Overlay(BasicConfig const &config)
+std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Creates the implementation of Overlay.
diff --git a/namespaceripple.html b/namespaceripple.html
index 7195ad1034..745689905c 100644
--- a/namespaceripple.html
+++ b/namespaceripple.html
@@ -40693,7 +40693,7 @@ template<typename headers >
@@ -40713,7 +40713,7 @@ template<typename headers >
@@ -40781,7 +40781,7 @@ template<typename headers >
Creates the implementation of Overlay.
-Definition at line 1572 of file OverlayImpl.cpp.
+Definition at line 1575 of file OverlayImpl.cpp.