nuke from orbit style router profiling for path build timeouts.

* when a path build times out, shitlist every router in the path except the first hop, this way eventually we get the nodedb pruned to only the routers that are currently actually alive, any ones we nuke that we need later we can always do lookups for.
pull/1658/head
Jeff Becker 3 years ago
parent 1f9b8e5972
commit 6a3dc67e9b
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -477,6 +477,17 @@ namespace llarp
m_router->routerProfiling().MarkPathTimeout(p.get());
PathSet::HandlePathBuildTimeout(p);
DoPathBuildBackoff();
bool firstHop = true;
for (const auto& hop : p->hops)
{
if (not firstHop)
{
RouterID router{hop.rc.pubkey};
LogWarn(Name(), " removing router ", router, " because of path build timeout");
m_router->nodedb()->Remove(router);
}
firstHop = false;
}
}
void

Loading…
Cancel
Save