Merge pull request #1087 from majestrate/dont-flood-dht-2020-02-07

dont flood dht with requests, if we know of a router don't look it up
pull/1092/head
Jeff 4 years ago committed by GitHub
commit 8cad7fecbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 and router->nodedb()->Has(pk))
continue;
parent->LookupRouter(
pk,
std::bind(&AbstractRouter::HandleDHTLookupForExplore, router, pk,

Loading…
Cancel
Save