use 1 for dht exploration

This commit is contained in:
Jeff Becker 2019-05-14 12:15:46 -04:00
parent ec100cffee
commit 06be908369
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 2 additions and 4 deletions

View File

@ -648,15 +648,13 @@ namespace llarp
// ourKey should never be in the connected list
// requester is likely in the connected list
// 4 or connection nodes (minus a potential requestor), whatever is less
const size_t want = std::min(size_t(4), nodeCount);
llarp::LogDebug("We want ", want, " connected nodes in the DHT");
if(!_nodes->GetManyNearExcluding(t, found, want,
if(!_nodes->GetManyNearExcluding(t, found, 1,
std::set< Key_t >{ourKey, requester}))
{
llarp::LogError(
"not enough dht nodes to handle exploritory router lookup, "
"need a minimum of ",
want, " dht peers");
"have ", nodeCount, " dht peers");
return false;
}
for(const auto& f : found)