mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Typo + some clippy stuff (unnecessary clone/to_string/refs) + fmt (#1437)
This commit is contained in:
@@ -247,8 +247,7 @@ impl SubstrateCli for RelayChainCli {
|
||||
}
|
||||
|
||||
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
polkadot_cli::Cli::from_iter([RelayChainCli::executable_name().to_string()].iter())
|
||||
.load_spec(id)
|
||||
polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)
|
||||
}
|
||||
|
||||
fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
|
||||
@@ -405,9 +404,7 @@ pub fn run() -> Result<()> {
|
||||
runner.sync_run(|config| {
|
||||
let polkadot_cli = RelayChainCli::new(
|
||||
&config,
|
||||
[RelayChainCli::executable_name().to_string()]
|
||||
.iter()
|
||||
.chain(cli.relaychain_args.iter()),
|
||||
[RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()),
|
||||
);
|
||||
|
||||
let polkadot_config = SubstrateCli::create_configuration(
|
||||
@@ -520,9 +517,7 @@ pub fn run() -> Result<()> {
|
||||
|
||||
let polkadot_cli = RelayChainCli::new(
|
||||
&config,
|
||||
[RelayChainCli::executable_name().to_string()]
|
||||
.iter()
|
||||
.chain(cli.relaychain_args.iter()),
|
||||
[RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()),
|
||||
);
|
||||
|
||||
let id = ParaId::from(para_id);
|
||||
|
||||
@@ -65,7 +65,7 @@ where
|
||||
let FullDeps { client, pool, deny_unsafe } = deps;
|
||||
|
||||
module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;
|
||||
module.merge(TransactionPayment::new(client.clone()).into_rpc())?;
|
||||
module.merge(TransactionPayment::new(client).into_rpc())?;
|
||||
|
||||
Ok(module)
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ where
|
||||
|
||||
let (client, backend, keystore_container, task_manager) =
|
||||
sc_service::new_full_parts::<Block, RuntimeApi, _>(
|
||||
&config,
|
||||
config,
|
||||
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
|
||||
executor,
|
||||
)?;
|
||||
@@ -748,7 +748,7 @@ pub fn rococo_parachain_build_import_queue(
|
||||
_,
|
||||
>(cumulus_client_consensus_aura::ImportQueueParams {
|
||||
block_import: client.clone(),
|
||||
client: client.clone(),
|
||||
client,
|
||||
create_inherent_data_providers: move |_, _| async move {
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
|
||||
@@ -760,7 +760,7 @@ pub fn rococo_parachain_build_import_queue(
|
||||
|
||||
Ok((timestamp, slot))
|
||||
},
|
||||
registry: config.prometheus_registry().clone(),
|
||||
registry: config.prometheus_registry(),
|
||||
can_author_with: sp_consensus::AlwaysCanAuthor,
|
||||
spawner: &task_manager.spawn_essential_handle(),
|
||||
telemetry,
|
||||
@@ -801,7 +801,7 @@ pub async fn start_rococo_parachain_node(
|
||||
task_manager.spawn_handle(),
|
||||
client.clone(),
|
||||
transaction_pool,
|
||||
prometheus_registry.clone(),
|
||||
prometheus_registry,
|
||||
telemetry.clone(),
|
||||
);
|
||||
|
||||
@@ -838,7 +838,7 @@ pub async fn start_rococo_parachain_node(
|
||||
}
|
||||
},
|
||||
block_import: client.clone(),
|
||||
para_client: client.clone(),
|
||||
para_client: client,
|
||||
backoff_authoring_blocks: Option::<()>::None,
|
||||
sync_oracle,
|
||||
keystore,
|
||||
@@ -890,7 +890,7 @@ where
|
||||
client,
|
||||
|_, _| async { Ok(()) },
|
||||
&task_manager.spawn_essential_handle(),
|
||||
config.prometheus_registry().clone(),
|
||||
config.prometheus_registry(),
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
@@ -942,15 +942,15 @@ where
|
||||
task_manager.spawn_handle(),
|
||||
client.clone(),
|
||||
transaction_pool,
|
||||
prometheus_registry.clone(),
|
||||
telemetry.clone(),
|
||||
prometheus_registry,
|
||||
telemetry,
|
||||
);
|
||||
|
||||
Ok(cumulus_client_consensus_relay_chain::build_relay_chain_consensus(
|
||||
cumulus_client_consensus_relay_chain::BuildRelayChainConsensusParams {
|
||||
para_id: id,
|
||||
proposer_factory,
|
||||
block_import: client.clone(),
|
||||
block_import: client,
|
||||
relay_chain_interface: relay_chain_interface.clone(),
|
||||
create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
|
||||
let relay_chain_interface = relay_chain_interface.clone();
|
||||
@@ -1153,12 +1153,12 @@ where
|
||||
_phantom: PhantomData,
|
||||
};
|
||||
|
||||
let registry = config.prometheus_registry().clone();
|
||||
let registry = config.prometheus_registry();
|
||||
let spawner = task_manager.spawn_essential_handle();
|
||||
|
||||
Ok(BasicQueue::new(
|
||||
verifier,
|
||||
Box::new(ParachainBlockImport::new(client.clone())),
|
||||
Box::new(ParachainBlockImport::new(client)),
|
||||
None,
|
||||
&spawner,
|
||||
registry,
|
||||
@@ -1286,8 +1286,8 @@ where
|
||||
task_manager.spawn_handle(),
|
||||
client.clone(),
|
||||
transaction_pool,
|
||||
prometheus_registry.clone(),
|
||||
telemetry.clone(),
|
||||
prometheus_registry,
|
||||
telemetry,
|
||||
);
|
||||
|
||||
let relay_chain_consensus =
|
||||
@@ -1321,7 +1321,7 @@ where
|
||||
);
|
||||
|
||||
let parachain_consensus = Box::new(WaitForAuraConsensus {
|
||||
client: client.clone(),
|
||||
client,
|
||||
aura_consensus: Arc::new(Mutex::new(aura_consensus)),
|
||||
relay_chain_consensus: Arc::new(Mutex::new(relay_chain_consensus)),
|
||||
_phantom: PhantomData,
|
||||
@@ -1572,7 +1572,7 @@ pub fn contracts_rococo_build_import_queue(
|
||||
_,
|
||||
>(cumulus_client_consensus_aura::ImportQueueParams {
|
||||
block_import: client.clone(),
|
||||
client: client.clone(),
|
||||
client,
|
||||
create_inherent_data_providers: move |_, _| async move {
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user