Remove "dumpdir" example as obsolete

This commit is contained in:
Nick Mathewson 2020-11-20 08:08:32 -05:00
parent 7ecfa4c863
commit 300c9c3fde
1 changed files with 0 additions and 33 deletions

View File

@ -1,33 +0,0 @@
use log::LevelFilter;
use std::path::Path;
use tor_netdir::*;
fn main() -> Result<()> {
simple_logging::log_to_stderr(LevelFilter::Info);
let mut cfg = NetDirConfig::new();
let argv: Vec<_> = std::env::args().skip(1).collect();
let chutney_dir = if argv.len() == 2 && argv[0] == "chutney" {
Some(argv[1].clone())
} else {
None
};
match chutney_dir {
Some(d) => {
cfg.add_authorities_from_chutney(Path::new(&d))?;
cfg.set_cache_path(Path::new(&d));
}
None => cfg.add_default_authorities(),
};
let dir = cfg
.load()?
.unwrap_if_sufficient()
.map_err(|_| Error::NotEnoughInfo)?;
for r in dir.relays() {
println!("{}", r.rsa_id())
}
Ok(())
}