oxen-io / lokinet

Lokinet is an anonymous, decentralized and IP based overlay network for the internet.
https://lokinet.org/
GNU General Public License v3.0
1.76k stars 220 forks source link

simplify llarp::service::Endpoint::ReadyToDoLookup() #2048

Closed majestrate closed 1 year ago

majestrate commented 1 year ago

previously we had a checking style function that passes in an optional defaulting to nullopt as a micro optimzation, this makes the code unnessarily obtuse.

simplify this by splitting up into 2 functions, one for getting the unique endpoints and one for checking if the number of them is above the minimum.