Merge pull request #1032 from majestrate/dht-explore-faster-2020-01-09

explore dht faster
pull/1042/head
Jeff 5 years ago committed by GitHub
commit a3bd44ae4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,7 @@ llarp_dht_allow_transit(llarp_dht_context *ctx)
void
llarp_dht_context_start(struct llarp_dht_context *ctx, const byte_t *key)
{
ctx->impl->Init(llarp::dht::Key_t(key), ctx->parent, 20000);
ctx->impl->Init(llarp::dht::Key_t(key), ctx->parent, 2000);
}
void

@ -1009,9 +1009,7 @@ namespace llarp
if(lookups.count(remote) >= MaxConcurrentLookups)
{
LogWarn(Name(), " has too many pending service lookups for ",
remote.ToString());
return false;
path = PickRandomEstablishedPath();
}
using namespace std::placeholders;
@ -1263,7 +1261,7 @@ namespace llarp
}
m_state->m_PendingTraffic.erase(r);
},
5000);
5000, false);
}
bool

@ -48,7 +48,7 @@ namespace llarp
{
SwapIntros();
}
UpdateIntroSet(true);
UpdateIntroSet(false);
}
return true;
}
@ -300,7 +300,7 @@ namespace llarp
}
if(currentIntroSet.HasExpiredIntros(now))
{
UpdateIntroSet(true);
UpdateIntroSet(false);
}
// send control message if we look too quiet
if(lastGoodSend)
@ -412,7 +412,7 @@ namespace llarp
{
// update introset
LogInfo(Name(), " updating introset");
UpdateIntroSet(true);
UpdateIntroSet(false);
return true;
}
return false;
@ -487,7 +487,7 @@ namespace llarp
OutboundContext::HandlePathDied(path::Path_ptr path)
{
// unconditionally update introset
UpdateIntroSet(true);
UpdateIntroSet(false);
const RouterID endpoint(path->Endpoint());
// if a path to our current intro died...
if(endpoint == remoteIntro.router)

Loading…
Cancel
Save