kill dead routers from nodedb and lessen logs

pull/437/head
Jeff Becker 5 years ago
parent 8a63533d1a
commit 7065b00c22
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -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))

@ -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);
}

Loading…
Cancel
Save