mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Gav display addrs (#267)
* Tidy up warnings * Better Display for AccountId
This commit is contained in:
+19
-19
@@ -160,25 +160,6 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
|
|||||||
|
|
||||||
config.chain_name = chain_spec.clone().into();
|
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")
|
let base_path = matches.value_of("base-path")
|
||||||
.map(|x| Path::new(x).to_owned())
|
.map(|x| Path::new(x).to_owned())
|
||||||
.unwrap_or_else(default_base_path);
|
.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(),
|
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 {
|
match role == service::Role::LIGHT {
|
||||||
true => run_until_exit(core, service::new_light(config)?, &matches, sys_conf),
|
true => run_until_exit(core, service::new_light(config)?, &matches, sys_conf),
|
||||||
false => run_until_exit(core, service::new_full(config)?, &matches, sys_conf),
|
false => run_until_exit(core, service::new_full(config)?, &matches, sys_conf),
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ impl Components for FullComponents {
|
|||||||
|
|
||||||
// Load the first available key
|
// Load the first available key
|
||||||
let key = keystore.load(&keystore.contents()?[0], "")?;
|
let key = keystore.load(&keystore.contents()?[0], "")?;
|
||||||
info!("Using authority key {:?}", key.public());
|
info!("Using authority key: {}", key.public());
|
||||||
Ok(Some(consensus::Service::new(
|
Ok(Some(consensus::Service::new(
|
||||||
client.clone(),
|
client.clone(),
|
||||||
client.clone(),
|
client.clone(),
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ impl<Components> Service<Components>
|
|||||||
let api = components.build_api(client.clone());
|
let api = components.build_api(client.clone());
|
||||||
let best_header = client.best_block_header()?;
|
let best_header = client.best_block_header()?;
|
||||||
|
|
||||||
info!("Best block is #{}", best_header.number);
|
info!("Best block: #{}", best_header.number);
|
||||||
telemetry!("node.start"; "height" => best_header.number, "best" => ?best_header.hash());
|
telemetry!("node.start"; "height" => best_header.number, "best" => ?best_header.hash());
|
||||||
|
|
||||||
let transaction_pool = Arc::new(TransactionPool::new(config.transaction_pool, api.clone()));
|
let transaction_pool = Arc::new(TransactionPool::new(config.transaction_pool, api.clone()));
|
||||||
|
|||||||
Reference in New Issue
Block a user