mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
diversify endpoints
This commit is contained in:
parent
9f153f12e0
commit
8a5365d9a6
|
@ -647,6 +647,13 @@ namespace llarp
|
|||
// exclude exit node as first hop in any paths
|
||||
exclude.insert(exits.begin(), exits.end());
|
||||
}
|
||||
if(hop == numHops - 1)
|
||||
{
|
||||
// diversify endpoints
|
||||
ForEachPath([&exclude](const path::Path_ptr& path) {
|
||||
exclude.insert(path->Endpoint());
|
||||
});
|
||||
}
|
||||
return path::Builder::SelectHop(db, exclude, cur, hop, roles);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue