|
|
|
@ -405,7 +405,7 @@ namespace data
@@ -405,7 +405,7 @@ namespace data
|
|
|
|
|
/* if(m_FloodfillBootstrap)
|
|
|
|
|
RequestDestinationFrom(router, m_FloodfillBootstrap->GetIdentHash(), true); |
|
|
|
|
else */if (!IsRouterBanned (router)) |
|
|
|
|
netdb.RequestDestination (router); |
|
|
|
|
RequestDestination (router, nullptr, true); |
|
|
|
|
else |
|
|
|
|
LogPrint (eLogDebug, "NetDbReq: Router ", peerHash, " is banned. Skipped"); |
|
|
|
|
} |
|
|
|
@ -413,5 +413,26 @@ namespace data
@@ -413,5 +413,26 @@ namespace data
|
|
|
|
|
LogPrint (eLogDebug, "NetDbReq: [:|||:]"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void NetDbRequests::PostRequestDestination (const IdentHash& destination, |
|
|
|
|
const RequestedDestination::RequestComplete& requestComplete, bool direct) |
|
|
|
|
{ |
|
|
|
|
GetIOService ().post ([this, destination, requestComplete, direct]() |
|
|
|
|
{ |
|
|
|
|
RequestDestination (destination, requestComplete, direct); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void NetDbRequests::RequestDestination (const IdentHash& destination, const RequestedDestination::RequestComplete& requestComplete, bool direct) |
|
|
|
|
{ |
|
|
|
|
auto dest = CreateRequest (destination, false, direct, requestComplete); // non-exploratory
|
|
|
|
|
if (dest) |
|
|
|
|
{ |
|
|
|
|
if (!SendNextRequest (dest)) |
|
|
|
|
RequestComplete (destination, nullptr); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
LogPrint (eLogWarning, "NetDbReq: Destination ", destination.ToBase64(), " is requested already or cached"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|