Skip to content

Refactor NetDirProvider APIs to better support timeliness.

Nick Mathewson requested to merge nickm/arti:netdir_api into main

Over the years we've found that most callers who want a netdir want what C Tor calls a "reasonably live" network directory: One that is not expired by too much, or too far in the future. But a few want a strictly live directory: one that says it is valid now, with no tolerances. And a few want any directory, no matter how expired it is.

Having separate APIs for these cases, and making the caller specify what kind of netdir they want, reduces the chances of specifying the wrong kind, and lets us remove some redundant checks.

Closes #518 (closed).

Edited by Ian Jackson

Merge request reports