dont flood dht with requests, if we know of a router don't look it up

pull/1087/head
Jeff Becker 5 years ago
parent e44449b2d5
commit cd27b33849
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -4,6 +4,8 @@
#include <dht/messages/findrouter.hpp>
#include <router/abstractrouter.hpp>
#include <nodedb.hpp>
namespace llarp
{
namespace dht
@ -24,6 +26,8 @@ namespace llarp
for(const auto &pk : valuesFound)
{
// lookup router
if(router->nodedb()->Has(pk))
continue;
parent->LookupRouter(
pk,
std::bind(&AbstractRouter::HandleDHTLookupForExplore, router, pk,

Loading…
Cancel
Save