updated to call from command line, now need to do something about peer store root output

This commit is contained in:
Yeastplume 2024-11-21 14:57:26 +00:00
parent f5b0316f64
commit 0840f2c535
4 changed files with 23 additions and 2 deletions

View file

@ -202,6 +202,20 @@ fn real_main() -> i32 {
}
}
// seedcheck command
("seedcheck", Some(seedcheck_args)) => {
let is_testnet = seedcheck_args.is_present("testnet");
let results = tools::check_seeds(is_testnet);
println!(
"Generating seed check report, testnet={}. (This make take a few minutes)",
is_testnet
);
for result in results {
println!("{}", serde_json::to_string_pretty(&result).unwrap());
}
0
}
// If nothing is specified, try to just use the config file instead
// this could possibly become the way to configure most things
// with most command line options being phased out

View file

@ -92,3 +92,10 @@ subcommands:
- hash:
help: The header hash to invalidate
required: true
- seedcheck:
about: Check the health of seed nodes
args:
- testnet:
help: Run seed check against Testnet (as opposed to Mainnet)
long: testnet
takes_value: false

View file

@ -14,3 +14,5 @@
/// Grin tools
mod seedcheck;
pub use seedcheck::check_seeds;

View file

@ -25,8 +25,6 @@ use std::time::Duration;
use thiserror::Error;
use chrono::*;
#[derive(Error, Debug)]
pub enum SeedCheckError {
#[error("Seed Connect Error {0}")]