Browse Source

cleanup from some overhead

pull/739/head
orignal 8 years ago
parent
commit
37e4dfc5d5
  1. 4
      NetDb.cpp

4
NetDb.cpp

@ -912,7 +912,6 @@ namespace data
uint8_t randomHash[32]; uint8_t randomHash[32];
std::vector<i2p::tunnel::TunnelMessageBlock> msgs; std::vector<i2p::tunnel::TunnelMessageBlock> msgs;
std::set<const RouterInfo *> floodfills;
LogPrint (eLogInfo, "NetDb: exploring new ", numDestinations, " routers ..."); LogPrint (eLogInfo, "NetDb: exploring new ", numDestinations, " routers ...");
for (int i = 0; i < numDestinations; i++) for (int i = 0; i < numDestinations; i++)
{ {
@ -924,9 +923,8 @@ namespace data
return; return;
} }
auto floodfill = GetClosestFloodfill (randomHash, dest->GetExcludedPeers ()); auto floodfill = GetClosestFloodfill (randomHash, dest->GetExcludedPeers ());
if (floodfill && !floodfills.count (floodfill.get ())) // request floodfill only once if (floodfill)
{ {
floodfills.insert (floodfill.get ());
if (i2p::transport::transports.IsConnected (floodfill->GetIdentHash ())) if (i2p::transport::transports.IsConnected (floodfill->GetIdentHash ()))
throughTunnels = false; throughTunnels = false;
if (throughTunnels) if (throughTunnels)

Loading…
Cancel
Save