fix bootstrap

(cherry picked from commit 8ee36d71ff)
pull/167/head
Jeff Becker 5 years ago committed by Ryan Tharp
parent db6945b6a0
commit 261254ce2b

@ -660,25 +660,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