mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 04:11:07 +00:00
Allow bootnodes as IP:PORT, query Peer-id (#386)
* Simplify cli parsing: remove unnecessary match for Version and help: e.exit() manages both for us already * Allow passing of IP:PORT as bootnodes, then try to discover its PEER_ID
This commit is contained in:
committed by
GitHub
parent
e47e946e3a
commit
64ed1db60c
@@ -171,14 +171,11 @@ pub fn run<I, T, W>(args: I, worker: W) -> error::Result<()> where
|
||||
panic_hook::set();
|
||||
|
||||
let yaml = load_yaml!("./cli.yml");
|
||||
let matches = match clap::App::from_yaml(yaml).version(&(crate_version!().to_owned() + "\n")[..]).get_matches_from_safe(args) {
|
||||
Ok(m) => m,
|
||||
Err(ref e) if e.kind == clap::ErrorKind::VersionDisplayed => return Ok(()),
|
||||
Err(ref e) if e.kind == clap::ErrorKind::HelpDisplayed => {
|
||||
print!("{}", e);
|
||||
return Ok(())
|
||||
}
|
||||
Err(e) => e.exit(),
|
||||
let matches = match clap::App::from_yaml(yaml)
|
||||
.version(&(crate_version!().to_owned() + "\n")[..])
|
||||
.get_matches_from_safe(args) {
|
||||
Ok(m) => m,
|
||||
Err(e) => e.exit(),
|
||||
};
|
||||
|
||||
// TODO [ToDr] Split parameters parsing from actual execution.
|
||||
|
||||
Reference in New Issue
Block a user