pub async fn download_bandwidth_file(
endpoints: Option<&[DirPort]>,
request_timeout: Option<Duration>,
) -> Result<DownloadResult, Error>Expand description
Downloads the bandwidth file for the next consensus.
Bandwidth files contain measurements used by authorities to assign bandwidth weights in the consensus. These are produced by bandwidth measurement systems like sbws or Torflow.
§Arguments
endpoints- Optional list of endpoints to try.request_timeout- Optional timeout for each download attempt.
§Returns
A DownloadResult containing the bandwidth file.
§Errors
Returns Error::Download if all endpoints fail.
§See Also
super::bandwidth_file::BandwidthFilefor parsing the downloaded file