X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fprinter.rs;h=0d928b0328b1fa21f46621d8c216ccd3a9d5475d;hb=ddbb43272597ab9d0d12ad37528c8450f903d525;hp=c7e902358009a935565211ad62cd57823f7b7652;hpb=57c102899aedc4ee5d20df939cfc3d5266815b65;p=dnsseed-rust diff --git a/src/printer.rs b/src/printer.rs index c7e9023..0d928b0 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -51,7 +51,7 @@ impl Printer { out.write_all(b"\nNode counts by status:\n").expect("stdout broken?"); for i in 0..AddressState::get_count() { - out.write_all(format!("{}: {}\n", AddressState::from_num(i).unwrap().to_str(), + out.write_all(format!("{:22}: {}\n", AddressState::from_num(i).unwrap().to_str(), store.get_node_count(AddressState::from_num(i).unwrap()) ).as_bytes()).expect("stdout broken?"); } @@ -76,9 +76,10 @@ impl Printer { out.write_all(b"\nRetry times (in seconds):\n").expect("stdout broken?"); for i in 0..AddressState::get_count() { + let scan_secs = store.get_u64(U64Setting::RescanInterval(AddressState::from_num(i).unwrap())); out.write_all(format!( - "{} ({}): {}\n", AddressState::from_num(i).unwrap().to_str(), i, - store.get_u64(U64Setting::RescanInterval(AddressState::from_num(i).unwrap())) + "{:22} ({:2}): {:5} (ie {} hrs, {} min)\n", AddressState::from_num(i).unwrap().to_str(), i, + scan_secs, scan_secs / 60 / 60, (scan_secs / 60) % 60, ).as_bytes()).expect("stdout broken?"); }