mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Throw an error if a bootnode is registered with two different peer ids (#3891)
* Throw an error if a bootnode is registered with two different peer ids * Rename error * Fix compilation :( * Review feedback
This commit is contained in:
@@ -29,15 +29,15 @@ pub fn run<I, T, E>(args: I, exit: E, version: VersionInfo) -> error::Result<()>
|
||||
match config.roles {
|
||||
ServiceRoles::LIGHT => run_until_exit(
|
||||
runtime,
|
||||
service::new_light(config).map_err(|e| format!("{:?}", e))?,
|
||||
service::new_light(config)?,
|
||||
exit
|
||||
),
|
||||
_ => run_until_exit(
|
||||
runtime,
|
||||
service::new_full(config).map_err(|e| format!("{:?}", e))?,
|
||||
service::new_full(config)?,
|
||||
exit
|
||||
),
|
||||
}.map_err(|e| format!("{:?}", e))
|
||||
}
|
||||
}),
|
||||
ParseAndPrepare::BuildSpec(cmd) => cmd.run(load_spec),
|
||||
ParseAndPrepare::ExportBlocks(cmd) => cmd.run_with_builder(|config: Config<_>|
|
||||
|
||||
@@ -10,7 +10,7 @@ mod cli;
|
||||
|
||||
pub use substrate_cli::{VersionInfo, IntoExit, error};
|
||||
|
||||
fn main() {
|
||||
fn main() -> Result<(), cli::error::Error> {
|
||||
let version = VersionInfo {
|
||||
name: "Substrate Node",
|
||||
commit: env!("VERGEN_SHA_SHORT"),
|
||||
@@ -21,8 +21,5 @@ fn main() {
|
||||
support_url: "support.anonymous.an",
|
||||
};
|
||||
|
||||
if let Err(e) = cli::run(::std::env::args(), cli::Exit, version) {
|
||||
eprintln!("Fatal error: {}\n\n{:?}", e, e);
|
||||
std::process::exit(1)
|
||||
}
|
||||
cli::run(std::env::args(), cli::Exit, version)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user