mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-11 11:41:15 +03:00
updated to call from command line, now need to do something about peer store root output
This commit is contained in:
parent
f5b0316f64
commit
0840f2c535
4 changed files with 23 additions and 2 deletions
src/bin
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,3 +14,5 @@
|
|||
|
||||
/// Grin tools
|
||||
mod seedcheck;
|
||||
|
||||
pub use seedcheck::check_seeds;
|
||||
|
|
|
@ -25,8 +25,6 @@ use std::time::Duration;
|
|||
|
||||
use thiserror::Error;
|
||||
|
||||
use chrono::*;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum SeedCheckError {
|
||||
#[error("Seed Connect Error {0}")]
|
||||
|
|
Loading…
Add table
Reference in a new issue