mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 04:58:01 +00:00
Support running relay chain full node as non-collator (#1069)
* Run relay chain full node not as collator * Clean up
This commit is contained in:
@@ -166,6 +166,7 @@ where
|
||||
|
||||
async fn build_relay_chain_interface(
|
||||
polkadot_config: Configuration,
|
||||
parachain_config: &Configuration,
|
||||
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
|
||||
task_manager: &mut TaskManager,
|
||||
collator_options: CollatorOptions,
|
||||
@@ -173,14 +174,12 @@ async fn build_relay_chain_interface(
|
||||
match collator_options.relay_chain_rpc_url {
|
||||
Some(relay_chain_url) =>
|
||||
Ok((Arc::new(RelayChainRPCInterface::new(relay_chain_url).await?) as Arc<_>, None)),
|
||||
None => {
|
||||
let relay_chain_local = build_inprocess_relay_chain(
|
||||
polkadot_config,
|
||||
telemetry_worker_handle,
|
||||
task_manager,
|
||||
)?;
|
||||
Ok((relay_chain_local.0, Some(relay_chain_local.1)))
|
||||
},
|
||||
None => build_inprocess_relay_chain(
|
||||
polkadot_config,
|
||||
parachain_config,
|
||||
telemetry_worker_handle,
|
||||
task_manager,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,6 +266,7 @@ where
|
||||
|
||||
let (relay_chain_interface, collator_key) = build_relay_chain_interface(
|
||||
polkadot_config,
|
||||
¶chain_config,
|
||||
telemetry_worker_handle,
|
||||
&mut task_manager,
|
||||
collator_options.clone(),
|
||||
|
||||
Reference in New Issue
Block a user