Smaller dirmgr refactorings
Before returning to improve tests in tor-dirmgr (#80 (closed)), we should refactor and tweak a few things here.
-
Make a good way to generate a NetworkConfig
programmatically. -
Make a good way to generate a DownloadScheduleConfig
programmatically. -
Look for ways intor_dirmgr::state
to makeadd_from_cache()
andadd_from_dl
into the same function. To do this, we'll need a function that parses download strings into a vector of[(DocId,String,ParsedObject)]
with optional errors on the side. Maybe this is a trait that we add on toDocQuery
or something? -
Perhaps the ClientRequest enum should actually be an enum in DirClient.
Edited by Nick Mathewson