diff --git a/Application_8cpp_source.html b/Application_8cpp_source.html index ae08acee61..c86029ea1f 100644 --- a/Application_8cpp_source.html +++ b/Application_8cpp_source.html @@ -2371,7 +2371,7 @@ $(function() {
ripple::ApplicationImp::waitHandlerCounter_
ClosureCounter< void, boost::system::error_code const & > waitHandlerCounter_
Definition: Application.cpp:204
ripple::ApplicationImp::getOPs
NetworkOPs & getOPs() override
Definition: Application.cpp:545
ripple::ApplicationImp::run
void run() override
Definition: Application.cpp:1641
-
ripple::make_Overlay
std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, Stoppable &parent, 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.
Definition: OverlayImpl.cpp:1447
+
ripple::make_Overlay
std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, Stoppable &parent, 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.
Definition: OverlayImpl.cpp:1457
ripple::CollectorManager
Provides the beast::insight::Collector service.
Definition: CollectorManager.h:29
ripple::ConfigSection::importNodeDatabase
static std::string importNodeDatabase()
Definition: ConfigSections.h:43
std::chrono::milliseconds
@@ -2458,7 +2458,7 @@ $(function() {
ripple::ApplicationImp::m_ledgerMaster
std::unique_ptr< LedgerMaster > m_ledgerMaster
Definition: Application.cpp:186
ripple::Stoppable::isStopped
bool isStopped() const
Returns true if the requested stop has completed.
Definition: Stoppable.cpp:60
ripple::RPC::doCommand
Status doCommand(RPC::JsonContext &context, Json::Value &result)
Execute an RPC command and store the results in a Json::Value.
Definition: RPCHandler.cpp:213
-
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1342
+
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1352
ripple::ApplicationImp::logs
Logs & logs() override
Definition: Application.cpp:489
ripple::ApplicationImp::getPerfLog
perf::PerfLog & getPerfLog() override
Definition: Application.cpp:600
ripple::ApplicationImp::m_jobQueue
std::unique_ptr< JobQueue > m_jobQueue
Definition: Application.cpp:177
diff --git a/BuildInfo_8cpp_source.html b/BuildInfo_8cpp_source.html index 98da9719e3..bb29f8ebc7 100644 --- a/BuildInfo_8cpp_source.html +++ b/BuildInfo_8cpp_source.html @@ -104,7 +104,7 @@ $(function() {
33 // and follow the format described at http://semver.org/
34 //------------------------------------------------------------------------------
35 // clang-format off
-
36 char const* const versionString = "1.6.0-b8"
+
36 char const* const versionString = "1.6.0-rc1"
37 // clang-format on
38 
39 #if defined(DEBUG) || defined(SANITIZER)
diff --git a/OverlayImpl_8cpp_source.html b/OverlayImpl_8cpp_source.html index 981dc0ffa7..9a4c8a1dac 100644 --- a/OverlayImpl_8cpp_source.html +++ b/OverlayImpl_8cpp_source.html @@ -1156,7 +1156,7 @@ $(function() {
1094 
1095  auto info = getServerInfo();
1096 
-
1097  int last_validated_ledger_age = std::numeric_limits<int>::max();
+
1097  int last_validated_ledger_age = -1;
1098  if (info.isMember("validated_ledger"))
1099  last_validated_ledger_age = info["validated_ledger"]["age"].asInt();
1100  bool amendment_blocked = false;
@@ -1164,377 +1164,387 @@ $(function() {
1102  amendment_blocked = true;
1103  int number_peers = info["peers"].asInt();
1104  std::string server_state = info["server_state"].asString();
-
1105  auto load_factor = info["load_factor"].asDouble();
-
1106 
-
1107  enum { healthy, warning, critical };
-
1108  int health = healthy;
-
1109  auto set_health = [&health](int state) {
-
1110  if (health < state)
-
1111  health = state;
-
1112  };
-
1113 
-
1114  if (last_validated_ledger_age >= 7)
-
1115  {
-
1116  msg.body()[jss::info]["validated_ledger"] = last_validated_ledger_age;
-
1117  if (last_validated_ledger_age < 20)
-
1118  set_health(warning);
-
1119  else
-
1120  set_health(critical);
-
1121  }
-
1122 
-
1123  if (amendment_blocked)
-
1124  {
-
1125  msg.body()[jss::info]["amendment_blocked"] = true;
-
1126  set_health(critical);
-
1127  }
-
1128 
-
1129  if (number_peers <= 7)
-
1130  {
-
1131  msg.body()[jss::info]["peers"] = number_peers;
-
1132  if (number_peers != 0)
-
1133  set_health(warning);
-
1134  else
-
1135  set_health(critical);
-
1136  }
-
1137 
-
1138  if (!(server_state == "full" || server_state == "validating" ||
-
1139  server_state == "proposing"))
-
1140  {
-
1141  msg.body()[jss::info]["server_state"] = server_state;
-
1142  if (server_state == "syncing" || server_state == "tracking" ||
-
1143  server_state == "connected")
-
1144  {
-
1145  set_health(warning);
-
1146  }
-
1147  else
-
1148  set_health(critical);
-
1149  }
-
1150 
-
1151  if (load_factor > 100)
-
1152  {
-
1153  msg.body()[jss::info]["load_factor"] = load_factor;
-
1154  if (load_factor < 1000)
-
1155  set_health(warning);
-
1156  else
-
1157  set_health(critical);
-
1158  }
-
1159 
-
1160  if (health != critical)
-
1161  msg.result(boost::beast::http::status::ok);
-
1162  else
-
1163  msg.result(boost::beast::http::status::service_unavailable);
-
1164 
-
1165  msg.prepare_payload();
-
1166  handoff.response = std::make_shared<SimpleWriter>(msg);
-
1167  return true;
-
1168 }
-
1169 
-
1170 bool
-
1171 OverlayImpl::processRequest(http_request_type const& req, Handoff& handoff)
-
1172 {
-
1173  // Take advantage of || short-circuiting
-
1174  return processCrawl(req, handoff) || processValidatorList(req, handoff) ||
-
1175  processHealth(req, handoff);
-
1176 }
-
1177 
-
1178 Overlay::PeerSequence
-
1179 OverlayImpl::getActivePeers() const
-
1180 {
-
1181  Overlay::PeerSequence ret;
-
1182  ret.reserve(size());
-
1183 
-
1184  for_each([&ret](std::shared_ptr<PeerImp>&& sp) {
-
1185  ret.emplace_back(std::move(sp));
-
1186  });
+
1105  auto load_factor =
+
1106  info["load_factor"].asDouble() / info["load_base"].asDouble();
+
1107 
+
1108  enum { healthy, warning, critical };
+
1109  int health = healthy;
+
1110  auto set_health = [&health](int state) {
+
1111  if (health < state)
+
1112  health = state;
+
1113  };
+
1114 
+
1115  msg.body()[jss::info] = Json::objectValue;
+
1116  if (last_validated_ledger_age >= 7 || last_validated_ledger_age < 0)
+
1117  {
+
1118  msg.body()[jss::info]["validated_ledger"] = last_validated_ledger_age;
+
1119  if (last_validated_ledger_age < 20)
+
1120  set_health(warning);
+
1121  else
+
1122  set_health(critical);
+
1123  }
+
1124 
+
1125  if (amendment_blocked)
+
1126  {
+
1127  msg.body()[jss::info]["amendment_blocked"] = true;
+
1128  set_health(critical);
+
1129  }
+
1130 
+
1131  if (number_peers <= 7)
+
1132  {
+
1133  msg.body()[jss::info]["peers"] = number_peers;
+
1134  if (number_peers != 0)
+
1135  set_health(warning);
+
1136  else
+
1137  set_health(critical);
+
1138  }
+
1139 
+
1140  if (!(server_state == "full" || server_state == "validating" ||
+
1141  server_state == "proposing"))
+
1142  {
+
1143  msg.body()[jss::info]["server_state"] = server_state;
+
1144  if (server_state == "syncing" || server_state == "tracking" ||
+
1145  server_state == "connected")
+
1146  {
+
1147  set_health(warning);
+
1148  }
+
1149  else
+
1150  set_health(critical);
+
1151  }
+
1152 
+
1153  if (load_factor > 100)
+
1154  {
+
1155  msg.body()[jss::info]["load_factor"] = load_factor;
+
1156  if (load_factor < 1000)
+
1157  set_health(warning);
+
1158  else
+
1159  set_health(critical);
+
1160  }
+
1161 
+
1162  switch (health)
+
1163  {
+
1164  case healthy:
+
1165  msg.result(boost::beast::http::status::ok);
+
1166  break;
+
1167  case warning:
+
1168  msg.result(boost::beast::http::status::service_unavailable);
+
1169  break;
+
1170  case critical:
+
1171  msg.result(boost::beast::http::status::internal_server_error);
+
1172  break;
+
1173  }
+
1174 
+
1175  msg.prepare_payload();
+
1176  handoff.response = std::make_shared<SimpleWriter>(msg);
+
1177  return true;
+
1178 }
+
1179 
+
1180 bool
+
1181 OverlayImpl::processRequest(http_request_type const& req, Handoff& handoff)
+
1182 {
+
1183  // Take advantage of || short-circuiting
+
1184  return processCrawl(req, handoff) || processValidatorList(req, handoff) ||
+
1185  processHealth(req, handoff);
+
1186 }
1187 
-
1188  return ret;
-
1189 }
-
1190 
-
1191 void
-
1192 OverlayImpl::checkSanity(std::uint32_t index)
-
1193 {
-
1194  for_each(
-
1195  [index](std::shared_ptr<PeerImp>&& sp) { sp->checkSanity(index); });
-
1196 }
+
1188 Overlay::PeerSequence
+
1189 OverlayImpl::getActivePeers() const
+
1190 {
+
1191  Overlay::PeerSequence ret;
+
1192  ret.reserve(size());
+
1193 
+
1194  for_each([&ret](std::shared_ptr<PeerImp>&& sp) {
+
1195  ret.emplace_back(std::move(sp));
+
1196  });
1197 
-
1198 void
-
1199 OverlayImpl::check()
-
1200 {
-
1201  for_each([](std::shared_ptr<PeerImp>&& sp) { sp->check(); });
-
1202 }
-
1203 
-
1204 std::shared_ptr<Peer>
-
1205 OverlayImpl::findPeerByShortID(Peer::id_t const& id)
-
1206 {
-
1207  std::lock_guard lock(mutex_);
-
1208  auto const iter = ids_.find(id);
-
1209  if (iter != ids_.end())
-
1210  return iter->second.lock();
-
1211  return {};
+
1198  return ret;
+
1199 }
+
1200 
+
1201 void
+
1202 OverlayImpl::checkSanity(std::uint32_t index)
+
1203 {
+
1204  for_each(
+
1205  [index](std::shared_ptr<PeerImp>&& sp) { sp->checkSanity(index); });
+
1206 }
+
1207 
+
1208 void
+
1209 OverlayImpl::check()
+
1210 {
+
1211  for_each([](std::shared_ptr<PeerImp>&& sp) { sp->check(); });
1212 }
1213 
-
1214 // A public key hash map was not used due to the peer connect/disconnect
-
1215 // update overhead outweighing the performance of a small set linear search.
-
1216 std::shared_ptr<Peer>
-
1217 OverlayImpl::findPeerByPublicKey(PublicKey const& pubKey)
-
1218 {
-
1219  std::lock_guard lock(mutex_);
-
1220  for (auto const& e : ids_)
-
1221  {
-
1222  if (auto peer = e.second.lock())
-
1223  {
-
1224  if (peer->getNodePublic() == pubKey)
-
1225  return peer;
-
1226  }
-
1227  }
-
1228  return {};
-
1229 }
-
1230 
-
1231 void
-
1232 OverlayImpl::broadcast(protocol::TMProposeSet& m)
-
1233 {
-
1234  auto const sm = std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER);
-
1235  for_each([&](std::shared_ptr<PeerImp>&& p) { p->send(sm); });
-
1236 }
-
1237 
-
1238 void
-
1239 OverlayImpl::relay(protocol::TMProposeSet& m, uint256 const& uid)
-
1240 {
-
1241  if (auto const toSkip = app_.getHashRouter().shouldRelay(uid))
-
1242  {
-
1243  auto const sm =
-
1244  std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER);
-
1245  for_each([&](std::shared_ptr<PeerImp>&& p) {
-
1246  if (toSkip->find(p->id()) == toSkip->end())
-
1247  p->send(sm);
-
1248  });
-
1249  }
-
1250 }
-
1251 
-
1252 void
-
1253 OverlayImpl::broadcast(protocol::TMValidation& m)
-
1254 {
-
1255  auto const sm = std::make_shared<Message>(m, protocol::mtVALIDATION);
-
1256  for_each([sm](std::shared_ptr<PeerImp>&& p) { p->send(sm); });
-
1257 }
-
1258 
-
1259 void
-
1260 OverlayImpl::relay(protocol::TMValidation& m, uint256 const& uid)
-
1261 {
-
1262  if (auto const toSkip = app_.getHashRouter().shouldRelay(uid))
-
1263  {
-
1264  auto const sm = std::make_shared<Message>(m, protocol::mtVALIDATION);
-
1265  for_each([&](std::shared_ptr<PeerImp>&& p) {
-
1266  if (toSkip->find(p->id()) == toSkip->end())
-
1267  p->send(sm);
-
1268  });
-
1269  }
-
1270 }
-
1271 
-
1272 //------------------------------------------------------------------------------
-
1273 
-
1274 void
-
1275 OverlayImpl::remove(Child& child)
-
1276 {
-
1277  std::lock_guard lock(mutex_);
-
1278  list_.erase(&child);
-
1279  if (list_.empty())
-
1280  checkStopped();
-
1281 }
-
1282 
-
1283 void
-
1284 OverlayImpl::stop()
-
1285 {
-
1286  // Calling list_[].second->stop() may cause list_ to be modified
-
1287  // (OverlayImpl::remove() may be called on this same thread). So
-
1288  // iterating directly over list_ to call child->stop() could lead to
-
1289  // undefined behavior.
-
1290  //
-
1291  // Therefore we copy all of the weak/shared ptrs out of list_ before we
-
1292  // start calling stop() on them. That guarantees OverlayImpl::remove()
-
1293  // won't be called until vector<> children leaves scope.
-
1294  std::vector<std::shared_ptr<Child>> children;
-
1295  {
-
1296  std::lock_guard lock(mutex_);
-
1297  if (!work_)
-
1298  return;
-
1299  work_ = boost::none;
-
1300 
-
1301  children.reserve(list_.size());
-
1302  for (auto const& element : list_)
-
1303  {
-
1304  children.emplace_back(element.second.lock());
-
1305  }
-
1306  } // lock released
-
1307 
-
1308  for (auto const& child : children)
-
1309  {
-
1310  if (child != nullptr)
-
1311  child->stop();
-
1312  }
-
1313 }
-
1314 
-
1315 void
-
1316 OverlayImpl::autoConnect()
-
1317 {
-
1318  auto const result = m_peerFinder->autoconnect();
-
1319  for (auto addr : result)
-
1320  connect(addr);
-
1321 }
-
1322 
-
1323 void
-
1324 OverlayImpl::sendEndpoints()
-
1325 {
-
1326  auto const result = m_peerFinder->buildEndpointsForPeers();
-
1327  for (auto const& e : result)
-
1328  {
-
1329  std::shared_ptr<PeerImp> peer;
-
1330  {
-
1331  std::lock_guard lock(mutex_);
-
1332  auto const iter = m_peers.find(e.first);
-
1333  if (iter != m_peers.end())
-
1334  peer = iter->second.lock();
-
1335  }
-
1336  if (peer)
-
1337  peer->sendEndpoints(e.second.begin(), e.second.end());
-
1338  }
-
1339 }
-
1340 
-
1341 Overlay::Setup
-
1342 setup_Overlay(BasicConfig const& config)
-
1343 {
-
1344  Overlay::Setup setup;
-
1345 
-
1346  {
-
1347  auto const& section = config.section("overlay");
-
1348  setup.context = make_SSLContext("");
-
1349 
-
1350  set(setup.ipLimit, "ip_limit", section);
-
1351  if (setup.ipLimit < 0)
-
1352  Throw<std::runtime_error>("Configured IP limit is invalid");
-
1353 
-
1354  std::string ip;
-
1355  set(ip, "public_ip", section);
-
1356  if (!ip.empty())
-
1357  {
-
1358  boost::system::error_code ec;
-
1359  setup.public_ip = beast::IP::Address::from_string(ip, ec);
-
1360  if (ec || beast::IP::is_private(setup.public_ip))
-
1361  Throw<std::runtime_error>("Configured public IP is invalid");
-
1362  }
-
1363  }
-
1364 
-
1365  {
-
1366  auto const& section = config.section("crawl");
-
1367  auto const& values = section.values();
-
1368 
-
1369  if (values.size() > 1)
-
1370  {
-
1371  Throw<std::runtime_error>(
-
1372  "Configured [crawl] section is invalid, too many values");
-
1373  }
+
1214 std::shared_ptr<Peer>
+
1215 OverlayImpl::findPeerByShortID(Peer::id_t const& id)
+
1216 {
+
1217  std::lock_guard lock(mutex_);
+
1218  auto const iter = ids_.find(id);
+
1219  if (iter != ids_.end())
+
1220  return iter->second.lock();
+
1221  return {};
+
1222 }
+
1223 
+
1224 // A public key hash map was not used due to the peer connect/disconnect
+
1225 // update overhead outweighing the performance of a small set linear search.
+
1226 std::shared_ptr<Peer>
+
1227 OverlayImpl::findPeerByPublicKey(PublicKey const& pubKey)
+
1228 {
+
1229  std::lock_guard lock(mutex_);
+
1230  for (auto const& e : ids_)
+
1231  {
+
1232  if (auto peer = e.second.lock())
+
1233  {
+
1234  if (peer->getNodePublic() == pubKey)
+
1235  return peer;
+
1236  }
+
1237  }
+
1238  return {};
+
1239 }
+
1240 
+
1241 void
+
1242 OverlayImpl::broadcast(protocol::TMProposeSet& m)
+
1243 {
+
1244  auto const sm = std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER);
+
1245  for_each([&](std::shared_ptr<PeerImp>&& p) { p->send(sm); });
+
1246 }
+
1247 
+
1248 void
+
1249 OverlayImpl::relay(protocol::TMProposeSet& m, uint256 const& uid)
+
1250 {
+
1251  if (auto const toSkip = app_.getHashRouter().shouldRelay(uid))
+
1252  {
+
1253  auto const sm =
+
1254  std::make_shared<Message>(m, protocol::mtPROPOSE_LEDGER);
+
1255  for_each([&](std::shared_ptr<PeerImp>&& p) {
+
1256  if (toSkip->find(p->id()) == toSkip->end())
+
1257  p->send(sm);
+
1258  });
+
1259  }
+
1260 }
+
1261 
+
1262 void
+
1263 OverlayImpl::broadcast(protocol::TMValidation& m)
+
1264 {
+
1265  auto const sm = std::make_shared<Message>(m, protocol::mtVALIDATION);
+
1266  for_each([sm](std::shared_ptr<PeerImp>&& p) { p->send(sm); });
+
1267 }
+
1268 
+
1269 void
+
1270 OverlayImpl::relay(protocol::TMValidation& m, uint256 const& uid)
+
1271 {
+
1272  if (auto const toSkip = app_.getHashRouter().shouldRelay(uid))
+
1273  {
+
1274  auto const sm = std::make_shared<Message>(m, protocol::mtVALIDATION);
+
1275  for_each([&](std::shared_ptr<PeerImp>&& p) {
+
1276  if (toSkip->find(p->id()) == toSkip->end())
+
1277  p->send(sm);
+
1278  });
+
1279  }
+
1280 }
+
1281 
+
1282 //------------------------------------------------------------------------------
+
1283 
+
1284 void
+
1285 OverlayImpl::remove(Child& child)
+
1286 {
+
1287  std::lock_guard lock(mutex_);
+
1288  list_.erase(&child);
+
1289  if (list_.empty())
+
1290  checkStopped();
+
1291 }
+
1292 
+
1293 void
+
1294 OverlayImpl::stop()
+
1295 {
+
1296  // Calling list_[].second->stop() may cause list_ to be modified
+
1297  // (OverlayImpl::remove() may be called on this same thread). So
+
1298  // iterating directly over list_ to call child->stop() could lead to
+
1299  // undefined behavior.
+
1300  //
+
1301  // Therefore we copy all of the weak/shared ptrs out of list_ before we
+
1302  // start calling stop() on them. That guarantees OverlayImpl::remove()
+
1303  // won't be called until vector<> children leaves scope.
+
1304  std::vector<std::shared_ptr<Child>> children;
+
1305  {
+
1306  std::lock_guard lock(mutex_);
+
1307  if (!work_)
+
1308  return;
+
1309  work_ = boost::none;
+
1310 
+
1311  children.reserve(list_.size());
+
1312  for (auto const& element : list_)
+
1313  {
+
1314  children.emplace_back(element.second.lock());
+
1315  }
+
1316  } // lock released
+
1317 
+
1318  for (auto const& child : children)
+
1319  {
+
1320  if (child != nullptr)
+
1321  child->stop();
+
1322  }
+
1323 }
+
1324 
+
1325 void
+
1326 OverlayImpl::autoConnect()
+
1327 {
+
1328  auto const result = m_peerFinder->autoconnect();
+
1329  for (auto addr : result)
+
1330  connect(addr);
+
1331 }
+
1332 
+
1333 void
+
1334 OverlayImpl::sendEndpoints()
+
1335 {
+
1336  auto const result = m_peerFinder->buildEndpointsForPeers();
+
1337  for (auto const& e : result)
+
1338  {
+
1339  std::shared_ptr<PeerImp> peer;
+
1340  {
+
1341  std::lock_guard lock(mutex_);
+
1342  auto const iter = m_peers.find(e.first);
+
1343  if (iter != m_peers.end())
+
1344  peer = iter->second.lock();
+
1345  }
+
1346  if (peer)
+
1347  peer->sendEndpoints(e.second.begin(), e.second.end());
+
1348  }
+
1349 }
+
1350 
+
1351 Overlay::Setup
+
1352 setup_Overlay(BasicConfig const& config)
+
1353 {
+
1354  Overlay::Setup setup;
+
1355 
+
1356  {
+
1357  auto const& section = config.section("overlay");
+
1358  setup.context = make_SSLContext("");
+
1359 
+
1360  set(setup.ipLimit, "ip_limit", section);
+
1361  if (setup.ipLimit < 0)
+
1362  Throw<std::runtime_error>("Configured IP limit is invalid");
+
1363 
+
1364  std::string ip;
+
1365  set(ip, "public_ip", section);
+
1366  if (!ip.empty())
+
1367  {
+
1368  boost::system::error_code ec;
+
1369  setup.public_ip = beast::IP::Address::from_string(ip, ec);
+
1370  if (ec || beast::IP::is_private(setup.public_ip))
+
1371  Throw<std::runtime_error>("Configured public IP is invalid");
+
1372  }
+
1373  }
1374 
-
1375  bool crawlEnabled = true;
-
1376 
-
1377  // Only allow "0|1" as a value
-
1378  if (values.size() == 1)
-
1379  {
-
1380  try
-
1381  {
-
1382  crawlEnabled = boost::lexical_cast<bool>(values.front());
-
1383  }
-
1384  catch (boost::bad_lexical_cast const&)
-
1385  {
-
1386  Throw<std::runtime_error>(
-
1387  "Configured [crawl] section has invalid value: " +
-
1388  values.front());
-
1389  }
-
1390  }
-
1391 
-
1392  if (crawlEnabled)
-
1393  {
-
1394  if (get<bool>(section, "overlay", true))
+
1375  {
+
1376  auto const& section = config.section("crawl");
+
1377  auto const& values = section.values();
+
1378 
+
1379  if (values.size() > 1)
+
1380  {
+
1381  Throw<std::runtime_error>(
+
1382  "Configured [crawl] section is invalid, too many values");
+
1383  }
+
1384 
+
1385  bool crawlEnabled = true;
+
1386 
+
1387  // Only allow "0|1" as a value
+
1388  if (values.size() == 1)
+
1389  {
+
1390  try
+
1391  {
+
1392  crawlEnabled = boost::lexical_cast<bool>(values.front());
+
1393  }
+
1394  catch (boost::bad_lexical_cast const&)
1395  {
-
1396  setup.crawlOptions |= CrawlOptions::Overlay;
-
1397  }
-
1398  if (get<bool>(section, "server", true))
-
1399  {
-
1400  setup.crawlOptions |= CrawlOptions::ServerInfo;
-
1401  }
-
1402  if (get<bool>(section, "counts", false))
-
1403  {
-
1404  setup.crawlOptions |= CrawlOptions::ServerCounts;
-
1405  }
-
1406  if (get<bool>(section, "unl", true))
-
1407  {
-
1408  setup.crawlOptions |= CrawlOptions::Unl;
-
1409  }
-
1410  }
-
1411  }
-
1412  {
-
1413  auto const& section = config.section("vl");
-
1414 
-
1415  set(setup.vlEnabled, "enabled", section);
-
1416  }
-
1417 
-
1418  try
-
1419  {
-
1420  auto id = config.legacy("network_id");
-
1421 
-
1422  if (!id.empty())
-
1423  {
-
1424  if (id == "main")
-
1425  id = "0";
-
1426 
-
1427  if (id == "testnet")
-
1428  id = "1";
-
1429 
-
1430  if (id == "devnet")
-
1431  id = "2";
-
1432 
-
1433  setup.networkID = beast::lexicalCastThrow<std::uint32_t>(id);
-
1434  }
-
1435  }
-
1436  catch (...)
-
1437  {
-
1438  Throw<std::runtime_error>(
-
1439  "Configured [network_id] section is invalid: must be a number "
-
1440  "or one of the strings 'main', 'testnet' or 'devnet'.");
-
1441  }
+
1396  Throw<std::runtime_error>(
+
1397  "Configured [crawl] section has invalid value: " +
+
1398  values.front());
+
1399  }
+
1400  }
+
1401 
+
1402  if (crawlEnabled)
+
1403  {
+
1404  if (get<bool>(section, "overlay", true))
+
1405  {
+
1406  setup.crawlOptions |= CrawlOptions::Overlay;
+
1407  }
+
1408  if (get<bool>(section, "server", true))
+
1409  {
+
1410  setup.crawlOptions |= CrawlOptions::ServerInfo;
+
1411  }
+
1412  if (get<bool>(section, "counts", false))
+
1413  {
+
1414  setup.crawlOptions |= CrawlOptions::ServerCounts;
+
1415  }
+
1416  if (get<bool>(section, "unl", true))
+
1417  {
+
1418  setup.crawlOptions |= CrawlOptions::Unl;
+
1419  }
+
1420  }
+
1421  }
+
1422  {
+
1423  auto const& section = config.section("vl");
+
1424 
+
1425  set(setup.vlEnabled, "enabled", section);
+
1426  }
+
1427 
+
1428  try
+
1429  {
+
1430  auto id = config.legacy("network_id");
+
1431 
+
1432  if (!id.empty())
+
1433  {
+
1434  if (id == "main")
+
1435  id = "0";
+
1436 
+
1437  if (id == "testnet")
+
1438  id = "1";
+
1439 
+
1440  if (id == "devnet")
+
1441  id = "2";
1442 
-
1443  return setup;
-
1444 }
-
1445 
-
1446 std::unique_ptr<Overlay>
-
1447 make_Overlay(
-
1448  Application& app,
-
1449  Overlay::Setup const& setup,
-
1450  Stoppable& parent,
-
1451  ServerHandler& serverHandler,
-
1452  Resource::Manager& resourceManager,
-
1453  Resolver& resolver,
-
1454  boost::asio::io_service& io_service,
-
1455  BasicConfig const& config,
-
1456  beast::insight::Collector::ptr const& collector)
-
1457 {
-
1458  return std::make_unique<OverlayImpl>(
-
1459  app,
-
1460  setup,
-
1461  parent,
-
1462  serverHandler,
-
1463  resourceManager,
-
1464  resolver,
-
1465  io_service,
-
1466  config,
-
1467  collector);
-
1468 }
-
1469 
-
1470 } // namespace ripple
+
1443  setup.networkID = beast::lexicalCastThrow<std::uint32_t>(id);
+
1444  }
+
1445  }
+
1446  catch (...)
+
1447  {
+
1448  Throw<std::runtime_error>(
+
1449  "Configured [network_id] section is invalid: must be a number "
+
1450  "or one of the strings 'main', 'testnet' or 'devnet'.");
+
1451  }
+
1452 
+
1453  return setup;
+
1454 }
+
1455 
+
1456 std::unique_ptr<Overlay>
+
1457 make_Overlay(
+
1458  Application& app,
+
1459  Overlay::Setup const& setup,
+
1460  Stoppable& parent,
+
1461  ServerHandler& serverHandler,
+
1462  Resource::Manager& resourceManager,
+
1463  Resolver& resolver,
+
1464  boost::asio::io_service& io_service,
+
1465  BasicConfig const& config,
+
1466  beast::insight::Collector::ptr const& collector)
+
1467 {
+
1468  return std::make_unique<OverlayImpl>(
+
1469  app,
+
1470  setup,
+
1471  parent,
+
1472  serverHandler,
+
1473  resourceManager,
+
1474  resolver,
+
1475  io_service,
+
1476  config,
+
1477  collector);
+
1478 }
+
1479 
+
1480 } // namespace ripple
beast::PropertyStream::Source::name
std::string const & name() const
Returns the name of this source.
Definition: beast_PropertyStream.cpp:190
ripple::Resource::Manager::newInboundEndpoint
virtual Consumer newInboundEndpoint(beast::IP::Endpoint const &address)=0
Create a new endpoint keyed by inbound IP address or the forwarded IP if proxied.
-
ripple::OverlayImpl::findPeerByShortID
std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) override
Returns the peer with the matching short id, or null.
Definition: OverlayImpl.cpp:1205
-
ripple::OverlayImpl::relay
void relay(protocol::TMProposeSet &m, uint256 const &uid) override
Relay a proposal.
Definition: OverlayImpl.cpp:1239
+
ripple::OverlayImpl::findPeerByShortID
std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) override
Returns the peer with the matching short id, or null.
Definition: OverlayImpl.cpp:1215
+
ripple::OverlayImpl::relay
void relay(protocol::TMProposeSet &m, uint256 const &uid) override
Relay a proposal.
Definition: OverlayImpl.cpp:1249
ripple::Resource::Manager::newOutboundEndpoint
virtual Consumer newOutboundEndpoint(beast::IP::Endpoint const &address)=0
Create a new endpoint keyed by outbound IP address and port.
ripple::Application
Definition: Application.h:97
ripple::OverlayImpl::getServerCounts
Json::Value getServerCounts()
Returns information about the local server's performance counters.
Definition: OverlayImpl.cpp:954
@@ -1561,7 +1571,7 @@ $(function() {
Json::arrayValue
@ arrayValue
array value (ordered list)
Definition: json_value.h:42
ripple::http_request_type
boost::beast::http::request< boost::beast::http::dynamic_body > http_request_type
Definition: Handoff.h:31
std::vector::reserve
T reserve(T... args)
-
ripple::OverlayImpl::autoConnect
void autoConnect()
Definition: OverlayImpl.cpp:1316
+
ripple::OverlayImpl::autoConnect
void autoConnect()
Definition: OverlayImpl.cpp:1326
ripple::ValidatorList::getAvailable
boost::optional< Json::Value > getAvailable(boost::beast::string_view const &pubKey)
Returns the current valid list for the given publisher key, if available, as a Json object.
Definition: ValidatorList.cpp:801
ripple::Application::validatorSites
virtual ValidatorSite & validatorSites()=0
ripple::Overlay::Setup::crawlOptions
std::uint32_t crawlOptions
Definition: Overlay.h:77
@@ -1578,7 +1588,7 @@ $(function() {
ripple::base64_encode
std::string base64_encode(std::uint8_t const *data, std::size_t len)
Definition: base64.cpp:236
ripple::PublicKey::empty
bool empty() const noexcept
Definition: PublicKey.h:117
ripple::make_SSLContext
std::shared_ptr< boost::asio::ssl::context > make_SSLContext(std::string const &cipherList)
Create a self-signed SSL context that allows anonymous Diffie Hellman.
Definition: make_SSLContext.cpp:450
-
ripple::make_Overlay
std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, Stoppable &parent, 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.
Definition: OverlayImpl.cpp:1447
+
ripple::make_Overlay
std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, Stoppable &parent, 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.
Definition: OverlayImpl.cpp:1457
ripple::OverlayImpl::makePrefix
static std::string makePrefix(std::uint32_t id)
Definition: OverlayImpl.cpp:346
ripple::PeerFinder::Config::features
std::string features
The set of features we advertise.
Definition: PeerfinderManager.h:73
ripple::OverlayImpl::onHandoff
Handoff onHandoff(std::unique_ptr< stream_type > &&bundle, http_request_type &&request, endpoint_type remote_endpoint) override
Conditionally accept an incoming HTTP request.
Definition: OverlayImpl.cpp:174
@@ -1600,7 +1610,7 @@ $(function() {
ripple::stopwatch
Stopwatch & stopwatch()
Returns an instance of a wall clock.
Definition: chrono.h:86
std::setfill
T setfill(T... args)
ripple::to_string
std::string to_string(ListDisposition disposition)
Definition: ValidatorList.cpp:42
-
ripple::OverlayImpl::broadcast
void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
Definition: OverlayImpl.cpp:1232
+
ripple::OverlayImpl::broadcast
void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
Definition: OverlayImpl.cpp:1242
ripple::PeerFinder::Manager::new_outbound_slot
virtual std::shared_ptr< Slot > new_outbound_slot(beast::IP::Endpoint const &remote_endpoint)=0
Create a new outbound slot with the specified remote endpoint.
ripple::OverlayImpl::connect
void connect(beast::IP::Endpoint const &remote_endpoint) override
Establish a peer connection to the specified endpoint.
Definition: OverlayImpl.cpp:397
ripple::OverlayImpl::json
Json::Value json() override
Return diagnostics on the status of all peers.
Definition: OverlayImpl.cpp:991
@@ -1632,7 +1642,7 @@ $(function() {
ripple::base_uint< 256 >
ripple::OverlayImpl::size
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...
Definition: OverlayImpl.cpp:865
beast::rfc2616::is_keep_alive
bool is_keep_alive(boost::beast::http::message< isRequest, Body, Fields > const &m)
Definition: rfc2616.h:475
-
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1342
+
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1352
ripple::OverlayImpl::csMutex_
std::mutex csMutex_
Definition: OverlayImpl.h:120
Json::Value::append
Value & append(const Value &value)
Append value to array at the end.
Definition: json_value.cpp:882
ripple::CrawlOptions::Unl
@ Unl
Definition: OverlayImpl.cpp:50
@@ -1681,14 +1691,14 @@ $(function() {
ripple::OverlayImpl::TrafficGauges
Definition: OverlayImpl.h:485
ripple::OverlayImpl::Child::Child
Child(OverlayImpl &overlay)
Definition: OverlayImpl.cpp:56
ripple::HashRouter::shouldRelay
boost::optional< std::set< PeerShortID > > shouldRelay(uint256 const &key)
Determines whether the hashed item should be relayed.
Definition: HashRouter.cpp:112
-
ripple::OverlayImpl::getActivePeers
PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
Definition: OverlayImpl.cpp:1179
+
ripple::OverlayImpl::getActivePeers
PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
Definition: OverlayImpl.cpp:1189
beast::rfc2616::split_commas
Result split_commas(FwdIt first, FwdIt last)
Definition: rfc2616.h:288
ripple::Application::getValidationPublicKey
virtual PublicKey const & getValidationPublicKey() const =0
ripple::Handoff::moved
bool moved
Definition: Handoff.h:41
ripple::OverlayImpl::OverlayImpl
OverlayImpl(Application &app, Setup const &setup, Stoppable &parent, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Definition: OverlayImpl.cpp:113
std::condition_variable::wait_for
T wait_for(T... args)
ripple::Application::validators
virtual ValidatorList & validators()=0
-
ripple::OverlayImpl::processRequest
bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
Definition: OverlayImpl.cpp:1171
+
ripple::OverlayImpl::processRequest
bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
Definition: OverlayImpl.cpp:1181
ripple::ManifestDisposition::accepted
@ accepted
Manifest is valid.
ripple::Resource::Manager
Tracks load and resource consumption.
Definition: ResourceManager.h:36
ripple::BuildInfo::getFullVersionString
std::string const & getFullVersionString()
Full server version string.
Definition: BuildInfo.cpp:74
@@ -1701,7 +1711,7 @@ $(function() {
std::vector::emplace_back
T emplace_back(T... args)
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::deserializeManifest
boost::optional< Manifest > deserializeManifest(Slice s)
Constructs Manifest from serialized string.
Definition: app/misc/impl/Manifest.cpp:38
-
ripple::OverlayImpl::checkSanity
void checkSanity(std::uint32_t) override
Calls the checkSanity function on each peer.
Definition: OverlayImpl.cpp:1192
+
ripple::OverlayImpl::checkSanity
void checkSanity(std::uint32_t) override
Calls the checkSanity function on each peer.
Definition: OverlayImpl.cpp:1202
ripple::Overlay::Setup::ipLimit
int ipLimit
Definition: Overlay.h:76
ripple::Application::journal
virtual beast::Journal journal(std::string const &name)=0
ripple::Application::validatorManifests
virtual ManifestCache & validatorManifests()=0
@@ -1720,7 +1730,7 @@ $(function() {
Json::nullValue
@ nullValue
'null' value
Definition: json_value.h:36
ripple::OverlayImpl::list_
boost::container::flat_map< Child *, std::weak_ptr< Child > > list_
Definition: OverlayImpl.h:102
ripple::OverlayImpl::lastLink
void lastLink(std::uint32_t id)
Called when the last link from a peer chain is received.
Definition: OverlayImpl.cpp:850
-
ripple::OverlayImpl::check
void check() override
Calls the check function on each peer.
Definition: OverlayImpl.cpp:1199
+
ripple::OverlayImpl::check
void check() override
Calls the check function on each peer.
Definition: OverlayImpl.cpp:1209
ripple::OverlayImpl::Timer::Timer
Timer(OverlayImpl &overlay)
Definition: OverlayImpl.cpp:67
beast::WrappedSink
Wraps a Journal::Sink to prefix its output with a string.
Definition: WrappedSink.h:33
std::vector::empty
T empty(T... args)
@@ -1728,7 +1738,7 @@ $(function() {
ripple::TokenType::NodePublic
@ NodePublic
ripple::Overlay::Setup
Definition: Overlay.h:70
ripple::OverlayImpl::Timer::stop
void stop() override
Definition: OverlayImpl.cpp:73
-
ripple::OverlayImpl::findPeerByPublicKey
std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Definition: OverlayImpl.cpp:1217
+
ripple::OverlayImpl::findPeerByPublicKey
std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Definition: OverlayImpl.cpp:1227
ripple::ValidatorList::getJson
Json::Value getJson() const
Return a JSON representation of the state of the validator list.
Definition: ValidatorList.cpp:659
ripple::PeerReservationTable::contains
bool contains(PublicKey const &nodeId)
Definition: PeerReservationTable.h:92
std::stringstream::str
T str(T... args)
@@ -1746,7 +1756,6 @@ $(function() {
ripple::OverlayImpl::csLast_
std::atomic< std::chrono::seconds > csLast_
Definition: OverlayImpl.h:119
std::setw
T setw(T... args)
ripple::OverlayImpl
Definition: OverlayImpl.h:55
-
std::numeric_limits::max
T max(T... args)
ripple::OverlayImpl::reportTraffic
void reportTraffic(TrafficCount::category cat, bool isInbound, int bytes)
Definition: OverlayImpl.cpp:756
ripple::OverlayImpl::crawlShards
Json::Value crawlShards(bool pubKey, std::uint32_t hops) override
Returns information reported to the crawl shard RPC command.
Definition: OverlayImpl.cpp:765
ripple::TrafficCount::addCount
void addCount(category cat, bool inbound, int bytes)
Account for traffic associated with the given category.
Definition: TrafficCount.h:156
@@ -1767,10 +1776,10 @@ $(function() {
ripple::OverlayImpl::onWrite
void onWrite(beast::PropertyStream::Map &stream) override
Subclass override.
Definition: OverlayImpl.cpp:622
ripple::Application::getHashRouter
virtual HashRouter & getHashRouter()=0
ripple::BasicConfig
Holds unparsed configuration information.
Definition: BasicConfig.h:178
-
ripple::OverlayImpl::sendEndpoints
void sendEndpoints()
Definition: OverlayImpl.cpp:1324
+
ripple::OverlayImpl::sendEndpoints
void sendEndpoints()
Definition: OverlayImpl.cpp:1334
ripple::OverlayImpl::for_each
void for_each(UnaryFunc &&f) const
Definition: OverlayImpl.h:243
ripple::OverlayImpl::onStop
void onStop() override
Override called when the stop notification is issued.
Definition: OverlayImpl.cpp:603
-
ripple::OverlayImpl::stop
void stop()
Definition: OverlayImpl.cpp:1284
+
ripple::OverlayImpl::stop
void stop()
Definition: OverlayImpl.cpp:1294
std::exception::what
T what(T... args)
Json::Value
Represents a JSON value.
Definition: json_value.h:145
ripple::BasicConfig::section
Section & section(std::string const &name)
Returns the section with the given name.
Definition: BasicConfig.cpp:138
diff --git a/OverlayImpl_8h_source.html b/OverlayImpl_8h_source.html index 36f3a0d029..e4ca1eb7a8 100644 --- a/OverlayImpl_8h_source.html +++ b/OverlayImpl_8h_source.html @@ -570,8 +570,8 @@ $(function() {
545 #endif
beast::PropertyStream::Source::name
std::string const & name() const
Returns the name of this source.
Definition: beast_PropertyStream.cpp:190
-
ripple::OverlayImpl::findPeerByShortID
std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) override
Returns the peer with the matching short id, or null.
Definition: OverlayImpl.cpp:1205
-
ripple::OverlayImpl::relay
void relay(protocol::TMProposeSet &m, uint256 const &uid) override
Relay a proposal.
Definition: OverlayImpl.cpp:1239
+
ripple::OverlayImpl::findPeerByShortID
std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) override
Returns the peer with the matching short id, or null.
Definition: OverlayImpl.cpp:1215
+
ripple::OverlayImpl::relay
void relay(protocol::TMProposeSet &m, uint256 const &uid) override
Relay a proposal.
Definition: OverlayImpl.cpp:1249
ripple::OverlayImpl::m_statsMutex
std::mutex m_statsMutex
Definition: OverlayImpl.h:522
ripple::OverlayImpl::Stats::hook
beast::insight::Hook hook
Definition: OverlayImpl.h:518
ripple::Application
Definition: Application.h:97
@@ -595,7 +595,7 @@ $(function() {
ripple::OverlayImpl::getJqTransOverflow
std::uint64_t getJqTransOverflow() const override
Definition: OverlayImpl.h:322
ripple::http_request_type
boost::beast::http::request< boost::beast::http::dynamic_body > http_request_type
Definition: Handoff.h:31
std::vector::reserve
T reserve(T... args)
-
ripple::OverlayImpl::autoConnect
void autoConnect()
Definition: OverlayImpl.cpp:1316
+
ripple::OverlayImpl::autoConnect
void autoConnect()
Definition: OverlayImpl.cpp:1326
ripple::OverlayImpl::csIDs_
std::set< std::uint32_t > csIDs_
Definition: OverlayImpl.h:123
ripple::OverlayImpl::m_resolver
Resolver & m_resolver
Definition: OverlayImpl.h:111
ripple::OverlayImpl::mutex_
std::recursive_mutex mutex_
Definition: OverlayImpl.h:99
@@ -615,7 +615,7 @@ $(function() {
std::lock_guard
STL class.
ripple::OverlayImpl::onStart
void onStart() override
Override called during start.
Definition: OverlayImpl.cpp:593
ripple::OverlayImpl::TrafficGauges::TrafficGauges
TrafficGauges(char const *name, beast::insight::Collector::ptr const &collector)
Definition: OverlayImpl.h:487
-
ripple::OverlayImpl::broadcast
void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
Definition: OverlayImpl.cpp:1232
+
ripple::OverlayImpl::broadcast
void broadcast(protocol::TMProposeSet &m) override
Broadcast a proposal.
Definition: OverlayImpl.cpp:1242
ripple::OverlayImpl::connect
void connect(beast::IP::Endpoint const &remote_endpoint) override
Establish a peer connection to the specified endpoint.
Definition: OverlayImpl.cpp:397
ripple::OverlayImpl::json
Json::Value json() override
Return diagnostics on the status of all peers.
Definition: OverlayImpl.cpp:991
ripple::OverlayImpl::setup
Setup const & setup() const
Definition: OverlayImpl.h:166
@@ -666,20 +666,20 @@ $(function() {
ripple::OverlayImpl::Child::Child
Child(OverlayImpl &overlay)
Definition: OverlayImpl.cpp:56
atomic
ripple::OverlayImpl::TrafficGauges::bytesIn
beast::insight::Gauge bytesIn
Definition: OverlayImpl.h:496
-
ripple::OverlayImpl::getActivePeers
PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
Definition: OverlayImpl.cpp:1179
+
ripple::OverlayImpl::getActivePeers
PeerSequence getActivePeers() const override
Returns a sequence representing the current list of peers.
Definition: OverlayImpl.cpp:1189
memory
ripple::OverlayImpl::TrafficGauges::messagesIn
beast::insight::Gauge messagesIn
Definition: OverlayImpl.h:498
ripple::OverlayImpl::OverlayImpl
OverlayImpl(Application &app, Setup const &setup, Stoppable &parent, ServerHandler &serverHandler, Resource::Manager &resourceManager, Resolver &resolver, boost::asio::io_service &io_service, BasicConfig const &config, beast::insight::Collector::ptr const &collector)
Definition: OverlayImpl.cpp:113
beast::insight::Gauge
A metric for measuring an integral value.
Definition: Gauge.h:39
std::weak_ptr
STL class.
-
ripple::OverlayImpl::processRequest
bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
Definition: OverlayImpl.cpp:1171
+
ripple::OverlayImpl::processRequest
bool processRequest(http_request_type const &req, Handoff &handoff)
Handles non-peer protocol requests.
Definition: OverlayImpl.cpp:1181
ripple::Resource::Manager
Tracks load and resource consumption.
Definition: ResourceManager.h:36
ripple::OverlayImpl::~OverlayImpl
~OverlayImpl()
Definition: OverlayImpl.cpp:160
ripple::OverlayImpl::Child::~Child
virtual ~Child()
Definition: OverlayImpl.cpp:60
ripple::OverlayImpl::m_resourceManager
Resource::Manager & m_resourceManager
Definition: OverlayImpl.h:106
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::OverlayImpl::networkID
boost::optional< std::uint32_t > networkID() const override
Returns the ID of the network this server is configured for, if any.
Definition: OverlayImpl.h:352
-
ripple::OverlayImpl::checkSanity
void checkSanity(std::uint32_t) override
Calls the checkSanity function on each peer.
Definition: OverlayImpl.cpp:1192
+
ripple::OverlayImpl::checkSanity
void checkSanity(std::uint32_t) override
Calls the checkSanity function on each peer.
Definition: OverlayImpl.cpp:1202
ripple::OverlayImpl::remove
void remove(std::shared_ptr< PeerFinder::Slot > const &slot)
Definition: OverlayImpl.cpp:469
ripple::Overlay
Manages the set of connected peers.
Definition: Overlay.h:52
std
STL namespace.
@@ -690,12 +690,12 @@ $(function() {
condition_variable
ripple::OverlayImpl::list_
boost::container::flat_map< Child *, std::weak_ptr< Child > > list_
Definition: OverlayImpl.h:102
ripple::OverlayImpl::lastLink
void lastLink(std::uint32_t id)
Called when the last link from a peer chain is received.
Definition: OverlayImpl.cpp:850
-
ripple::OverlayImpl::check
void check() override
Calls the check function on each peer.
Definition: OverlayImpl.cpp:1199
+
ripple::OverlayImpl::check
void check() override
Calls the check function on each peer.
Definition: OverlayImpl.cpp:1209
ripple::OverlayImpl::Timer::Timer
Timer(OverlayImpl &overlay)
Definition: OverlayImpl.cpp:67
ripple::OverlayImpl::Child::stop
virtual void stop()=0
ripple::Handoff
Used to indicate the result of a server connection handoff.
Definition: Handoff.h:37
ripple::OverlayImpl::Timer::stop
void stop() override
Definition: OverlayImpl.cpp:73
-
ripple::OverlayImpl::findPeerByPublicKey
std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Definition: OverlayImpl.cpp:1217
+
ripple::OverlayImpl::findPeerByPublicKey
std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Definition: OverlayImpl.cpp:1227
mutex
ripple::OverlayImpl::isPeerUpgrade
static bool isPeerUpgrade(boost::beast::http::response< Body > const &response)
Definition: OverlayImpl.h:275
ripple::OverlayImpl::TrafficGauges::bytesOut
beast::insight::Gauge bytesOut
Definition: OverlayImpl.h:497
@@ -724,11 +724,11 @@ $(function() {
ripple::OverlayImpl::onWrite
void onWrite(beast::PropertyStream::Map &stream) override
Subclass override.
Definition: OverlayImpl.cpp:622
std::set< std::uint32_t >
ripple::BasicConfig
Holds unparsed configuration information.
Definition: BasicConfig.h:178
-
ripple::OverlayImpl::sendEndpoints
void sendEndpoints()
Definition: OverlayImpl.cpp:1324
+
ripple::OverlayImpl::sendEndpoints
void sendEndpoints()
Definition: OverlayImpl.cpp:1334
ripple::OverlayImpl::for_each
void for_each(UnaryFunc &&f) const
Definition: OverlayImpl.h:243
ripple::OverlayImpl::onStop
void onStop() override
Override called when the stop notification is issued.
Definition: OverlayImpl.cpp:603
ripple::PeerFinder::Manager
Maintains a set of IP addresses used for getting into the network.
Definition: PeerfinderManager.h:121
-
ripple::OverlayImpl::stop
void stop()
Definition: OverlayImpl.cpp:1284
+
ripple::OverlayImpl::stop
void stop()
Definition: OverlayImpl.cpp:1294
Json::Value
Represents a JSON value.
Definition: json_value.h:145
ripple::OverlayImpl::limit
int limit() override
Returns the maximum number of peers we are configured to allow.
Definition: OverlayImpl.cpp:872
ripple::OverlayImpl::processCrawl
bool processCrawl(http_request_type const &req, Handoff &handoff)
Handles crawl requests.
Definition: OverlayImpl.cpp:1002
diff --git a/PeerImp_8cpp_source.html b/PeerImp_8cpp_source.html index 01817e6e79..e03bac1ad5 100644 --- a/PeerImp_8cpp_source.html +++ b/PeerImp_8cpp_source.html @@ -3059,7 +3059,7 @@ $(function() {
ripple::PublicKey::data
std::uint8_t const * data() const noexcept
Definition: PublicKey.h:81
ripple::PeerImp::ledgerRange
void ledgerRange(std::uint32_t &minSeq, std::uint32_t &maxSeq) const override
Definition: PeerImp.cpp:455
ripple::PeerImp::uptime
clock_type::duration uptime() const
Definition: PeerImp.h:354
-
ripple::OverlayImpl::findPeerByShortID
std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) override
Returns the peer with the matching short id, or null.
Definition: OverlayImpl.cpp:1205
+
ripple::OverlayImpl::findPeerByShortID
std::shared_ptr< Peer > findPeerByShortID(Peer::id_t const &id) override
Returns the peer with the matching short id, or null.
Definition: OverlayImpl.cpp:1215
ripple::Resource::feeInvalidRequest
const Charge feeInvalidRequest
Schedule of fees charged for imposing load on the server.
ripple::Application
Definition: Application.h:97
ripple::ClusterNode
Definition: ClusterNode.h:30
@@ -3334,7 +3334,7 @@ $(function() {
ripple::PeerImp::setPublisherListSequence
void setPublisherListSequence(PublicKey const &pubKey, std::size_t const seq) override
Definition: PeerImp.h:377
ripple::RCLCxPeerPos::suppressionID
uint256 const & suppressionID() const
Unique id used by hash router to suppress duplicates.
Definition: RCLCxPeerPos.h:88
ripple::PeerImp::supportsFeature
bool supportsFeature(ProtocolFeature f) const override
Definition: PeerImp.cpp:425
-
ripple::OverlayImpl::findPeerByPublicKey
std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Definition: OverlayImpl.cpp:1217
+
ripple::OverlayImpl::findPeerByPublicKey
std::shared_ptr< Peer > findPeerByPublicKey(PublicKey const &pubKey) override
Returns the peer with the matching public key, or null.
Definition: OverlayImpl.cpp:1227
std::stringstream::str
T str(T... args)
beast::Journal::debug
Stream debug() const
Definition: Journal.h:315
std::size_t
diff --git a/ServerHandlerImp_8cpp_source.html b/ServerHandlerImp_8cpp_source.html index e97013f73a..598818d618 100644 --- a/ServerHandlerImp_8cpp_source.html +++ b/ServerHandlerImp_8cpp_source.html @@ -1329,7 +1329,7 @@ $(function() {
ripple::CollectorManager::group
virtual beast::insight::Group::ptr const & group(std::string const &name)=0
beast::rfc2616::is_keep_alive
bool is_keep_alive(boost::beast::http::message< isRequest, Body, Fields > const &m)
Definition: rfc2616.h:475
ripple::RPC::doCommand
Status doCommand(RPC::JsonContext &context, Json::Value &result)
Execute an RPC command and store the results in a Json::Value.
Definition: RPCHandler.cpp:213
-
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1342
+
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1352
ripple::ServerHandlerImp::Setup::overlay_t::port
std::uint16_t port
Definition: ServerHandlerImp.h:78
Json::Value::append
Value & append(const Value &value)
Append value to array at the end.
Definition: json_value.cpp:882
ripple::rpcSLOW_DOWN
@ rpcSLOW_DOWN
Definition: ErrorCodes.h:57
diff --git a/classripple_1_1OverlayImpl.html b/classripple_1_1OverlayImpl.html index cde9368701..ac52432b81 100644 --- a/classripple_1_1OverlayImpl.html +++ b/classripple_1_1OverlayImpl.html @@ -1179,7 +1179,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1179 of file OverlayImpl.cpp.

+

Definition at line 1189 of file OverlayImpl.cpp.

@@ -1210,7 +1210,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1199 of file OverlayImpl.cpp.

+

Definition at line 1209 of file OverlayImpl.cpp.

@@ -1248,7 +1248,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1192 of file OverlayImpl.cpp.

+

Definition at line 1202 of file OverlayImpl.cpp.

@@ -1280,7 +1280,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1205 of file OverlayImpl.cpp.

+

Definition at line 1215 of file OverlayImpl.cpp.

@@ -1312,7 +1312,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1217 of file OverlayImpl.cpp.

+

Definition at line 1227 of file OverlayImpl.cpp.

@@ -1344,7 +1344,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1232 of file OverlayImpl.cpp.

+

Definition at line 1242 of file OverlayImpl.cpp.

@@ -1376,7 +1376,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1253 of file OverlayImpl.cpp.

+

Definition at line 1263 of file OverlayImpl.cpp.

@@ -1418,7 +1418,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1239 of file OverlayImpl.cpp.

+

Definition at line 1249 of file OverlayImpl.cpp.

@@ -1460,7 +1460,7 @@ Private Attributes

Implements ripple::Overlay.

-

Definition at line 1260 of file OverlayImpl.cpp.

+

Definition at line 1270 of file OverlayImpl.cpp.

@@ -2326,7 +2326,7 @@ template<class Fields >

Handles non-peer protocol requests.

Returns
true if the request was handled.
-

Definition at line 1171 of file OverlayImpl.cpp.

+

Definition at line 1181 of file OverlayImpl.cpp.

@@ -2667,7 +2667,7 @@ template<class Fields >
-

Definition at line 1275 of file OverlayImpl.cpp.

+

Definition at line 1285 of file OverlayImpl.cpp.

@@ -2694,7 +2694,7 @@ template<class Fields >
-

Definition at line 1284 of file OverlayImpl.cpp.

+

Definition at line 1294 of file OverlayImpl.cpp.

@@ -2721,7 +2721,7 @@ template<class Fields >
-

Definition at line 1316 of file OverlayImpl.cpp.

+

Definition at line 1326 of file OverlayImpl.cpp.

@@ -2748,7 +2748,7 @@ template<class Fields >
-

Definition at line 1324 of file OverlayImpl.cpp.

+

Definition at line 1334 of file OverlayImpl.cpp.

diff --git a/make__Overlay_8h_source.html b/make__Overlay_8h_source.html index da55ec2f22..bc42593393 100644 --- a/make__Overlay_8h_source.html +++ b/make__Overlay_8h_source.html @@ -122,8 +122,8 @@ $(function() {
std::shared_ptr< Collector >
ripple::ServerHandler
ServerHandlerImp ServerHandler
Definition: ServerHandler.h:38
-
ripple::make_Overlay
std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, Stoppable &parent, 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.
Definition: OverlayImpl.cpp:1447
-
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1342
+
ripple::make_Overlay
std::unique_ptr< Overlay > make_Overlay(Application &app, Overlay::Setup const &setup, Stoppable &parent, 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.
Definition: OverlayImpl.cpp:1457
+
ripple::setup_Overlay
Overlay::Setup setup_Overlay(BasicConfig const &config)
Definition: OverlayImpl.cpp:1352
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
std::unique_ptr
STL class.
diff --git a/namespaceripple.html b/namespaceripple.html index 1b419ff994..634562e10d 100644 --- a/namespaceripple.html +++ b/namespaceripple.html @@ -21195,7 +21195,7 @@ template<typename T >
-

Definition at line 1342 of file OverlayImpl.cpp.

+

Definition at line 1352 of file OverlayImpl.cpp.

@@ -21269,7 +21269,7 @@ template<typename T >

Creates the implementation of Overlay.

-

Definition at line 1447 of file OverlayImpl.cpp.

+

Definition at line 1457 of file OverlayImpl.cpp.

diff --git a/namespaceripple_1_1BuildInfo.html b/namespaceripple_1_1BuildInfo.html index db38650c60..0d140d728e 100644 --- a/namespaceripple_1_1BuildInfo.html +++ b/namespaceripple_1_1BuildInfo.html @@ -99,7 +99,7 @@ Functions - + @@ -281,7 +281,7 @@ N: 6-bit rc/beta number (1-63)

Variables

char const *const versionString = "1.6.0-b8"
char const *const versionString = "1.6.0-rc1"
 
static constexpr std::uint64_t implementationVersionIdentifier
 
- +
char const* const ripple::BuildInfo::versionString = "1.6.0-b8"char const* const ripple::BuildInfo::versionString = "1.6.0-rc1"