1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

kill dead routers from nodedb and lessen logs

This commit is contained in:
Jeff Becker 2019-03-25 09:07:19 -04:00
parent 8a63533d1a
commit 7065b00c22
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05
2 changed files with 2 additions and 8 deletions

View file

@ -205,7 +205,6 @@ namespace llarp
llarp::AddressInfo to;
if(!PickAddress(rc, to))
return false;
llarp::LogInfo("Try establish to ", RouterID(rc.pubkey.as_array()));
llarp::Addr addr(to);
auto s = NewOutboundSession(rc, to);
if(PutSession(s))

View file

@ -74,12 +74,9 @@ struct TryConnectJob
Attempt();
return;
}
if(!router->IsServiceNode())
if(router->routerProfiling().IsBad(rc.pubkey))
{
if(router->routerProfiling().IsBad(rc.pubkey))
{
router->nodedb()->Remove(rc.pubkey);
}
router->nodedb()->Remove(rc.pubkey);
}
// delete this
router->pendingEstablishJobs.erase(rc.pubkey);
@ -91,8 +88,6 @@ struct TryConnectJob
--triesLeft;
if(!link->TryEstablishTo(rc))
{
llarp::LogError("did not attempt connection to ", rc.pubkey,
" and it has ", rc.addrs.size(), " advertised addresses");
// delete this
router->pendingEstablishJobs.erase(rc.pubkey);
}