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:
parent
8a63533d1a
commit
7065b00c22
|
@ -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…
Reference in a new issue