mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Gav display addrs (#267)
* Tidy up warnings * Better Display for AccountId
This commit is contained in:
@@ -160,25 +160,6 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
|
||||
|
||||
config.chain_name = chain_spec.clone().into();
|
||||
|
||||
let _guard = if matches.is_present("telemetry") || matches.value_of("telemetry-url").is_some() {
|
||||
let name = config.name.clone();
|
||||
let chain_name = config.chain_name.clone();
|
||||
Some(init_telemetry(TelemetryConfig {
|
||||
url: matches.value_of("telemetry-url").unwrap_or(DEFAULT_TELEMETRY_URL).into(),
|
||||
on_connect: Box::new(move || {
|
||||
telemetry!("system.connected";
|
||||
"name" => name.clone(),
|
||||
"implementation" => "parity-polkadot",
|
||||
"version" => crate_version!(),
|
||||
"config" => "",
|
||||
"chain" => chain_name.clone(),
|
||||
);
|
||||
}),
|
||||
}))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let base_path = matches.value_of("base-path")
|
||||
.map(|x| Path::new(x).to_owned())
|
||||
.unwrap_or_else(default_base_path);
|
||||
@@ -263,6 +244,25 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
|
||||
chain_name: config.chain_name.clone(),
|
||||
};
|
||||
|
||||
let _guard = if matches.is_present("telemetry") || matches.value_of("telemetry-url").is_some() {
|
||||
let name = config.name.clone();
|
||||
let chain_name = config.chain_name.clone();
|
||||
Some(init_telemetry(TelemetryConfig {
|
||||
url: matches.value_of("telemetry-url").unwrap_or(DEFAULT_TELEMETRY_URL).into(),
|
||||
on_connect: Box::new(move || {
|
||||
telemetry!("system.connected";
|
||||
"name" => name.clone(),
|
||||
"implementation" => "parity-polkadot",
|
||||
"version" => crate_version!(),
|
||||
"config" => "",
|
||||
"chain" => chain_name.clone(),
|
||||
);
|
||||
}),
|
||||
}))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
match role == service::Role::LIGHT {
|
||||
true => run_until_exit(core, service::new_light(config)?, &matches, sys_conf),
|
||||
false => run_until_exit(core, service::new_full(config)?, &matches, sys_conf),
|
||||
|
||||
Reference in New Issue
Block a user