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 NetworkConfigprogrammatically. -
Make a good way to generate a DownloadScheduleConfigprogrammatically. -
Look for ways intor_dirmgr::stateto makeadd_from_cache()andadd_from_dlinto 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 toDocQueryor something? -
Perhaps the ClientRequest enum should actually be an enum in DirClient.
Edited by Nick Mathewson