pub async fn download_microdescriptors(
hashes: &[&str],
endpoints: Option<&[DirPort]>,
request_timeout: Option<Duration>,
) -> Result<DownloadResult, Error>Expand description
Downloads microdescriptors by their hashes.
Microdescriptors are compact relay descriptions used by Tor clients. They are identified by their digest (hash) rather than fingerprint.
§Arguments
hashes- List of microdescriptor digests to fetch. Maximum 90 hashes per request.endpoints- Optional list of endpoints to try.request_timeout- Optional timeout for each download attempt.
§Returns
A DownloadResult containing the microdescriptors.
§Errors
Returns Error::InvalidRequest if more than 90 hashes are requested.
Returns Error::Download if all endpoints fail.
§Note
Microdescriptor hashes are obtained from the microdescriptor consensus. Each router status entry contains the hash of its microdescriptor.