Update Polkadot & Substrate (#300)

This commit is contained in:
Cecile Tonglet
2021-01-20 17:35:05 +01:00
committed by GitHub
parent 3fd6ec6bf1
commit b31a6b38a9
9 changed files with 249 additions and 289 deletions
+7 -6
View File
@@ -49,13 +49,13 @@ pub fn new_partial(
(),
sp_consensus::import_queue::BasicQueue<Block, PrefixedMemoryDB<BlakeTwo256>>,
sc_transaction_pool::FullPool<Block, TFullClient<Block, RuntimeApi, Executor>>,
(),
Option<sc_telemetry::TelemetrySpan>,
>,
sc_service::Error,
> {
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
let (client, backend, keystore_container, task_manager) =
let (client, backend, keystore_container, task_manager, telemetry_span) =
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
let client = Arc::new(client);
@@ -85,7 +85,7 @@ pub fn new_partial(
transaction_pool,
inherent_data_providers,
select_chain: (),
other: (),
other: telemetry_span,
};
Ok(params)
@@ -94,7 +94,7 @@ pub fn new_partial(
/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.
///
/// This is the actual implementation that is abstract over the executor and the runtime api.
#[sc_cli::prefix_logs_with("Parachain")]
#[sc_tracing::logging::prefix_logs_with("Parachain")]
async fn start_node_impl<RB>(
parachain_config: Configuration,
collator_key: CollatorPair,
@@ -125,6 +125,7 @@ where
)?;
let params = new_partial(&parachain_config)?;
let telemetry_span = params.other;
params
.inherent_data_providers
.register_provider(sp_timestamp::InherentDataProvider)
@@ -164,18 +165,18 @@ where
client: client.clone(),
transaction_pool: transaction_pool.clone(),
task_manager: &mut task_manager,
telemetry_connection_sinks: Default::default(),
config: parachain_config,
keystore: params.keystore_container.sync_keystore(),
backend: backend.clone(),
network: network.clone(),
network_status_sinks,
system_rpc_tx,
telemetry_span,
})?;
let announce_block = {
let network = network.clone();
Arc::new(move |hash, data| network.announce_block(hash, data))
Arc::new(move |hash, data| network.announce_block(hash, Some(data)))
};
if validator {