diversify endpoints

pull/1020/head
Jeff Becker 4 years ago
parent 9f153f12e0
commit 8a5365d9a6
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -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…
Cancel
Save