fix bootstrap

pull/174/head
Jeff Becker 6 years ago
parent bd0a98ba5a
commit 8ee36d71ff
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -659,25 +659,26 @@ namespace llarp
}
}
if(inboundLinks.size() == 0)
size_t N = nodedb->num_loaded();
if(N < minRequiredRouters)
{
size_t N = nodedb->num_loaded();
if(N < minRequiredRouters)
llarp::LogInfo("We need at least ", minRequiredRouters,
" service nodes to build paths but we have ", N);
// TODO: only connect to random subset
if(bootstrapRCList.size())
{
llarp::LogInfo("We need at least ", minRequiredRouters,
" service nodes to build paths but we have ", N);
// TODO: only connect to random subset
if(bootstrapRCList.size())
for(const auto &rc : bootstrapRCList)
{
for(const auto &rc : bootstrapRCList)
{
llarp_router_try_connect(this, rc, 4);
dht->impl.ExploreNetworkVia(rc.pubkey.data());
}
llarp_router_try_connect(this, rc, 4);
dht->impl.ExploreNetworkVia(rc.pubkey.data());
}
else
llarp::LogError("we have no bootstrap nodes specified");
}
else
llarp::LogError("we have no bootstrap nodes specified");
}
if(inboundLinks.size() == 0)
{
paths.BuildPaths(now);
hiddenServiceContext.Tick(now);
}

Loading…
Cancel
Save