From 84856f388c979077ef2b87f2238e51c3753880cf Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Wed, 22 Nov 2023 15:23:55 -0500 Subject: [PATCH] Little mods in the dev service to try to make it work. --- parachain-node/src/dev_service.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/parachain-node/src/dev_service.rs b/parachain-node/src/dev_service.rs index 0be45a1c4..c4df244a5 100644 --- a/parachain-node/src/dev_service.rs +++ b/parachain-node/src/dev_service.rs @@ -40,7 +40,9 @@ pub fn new_dev(mut config: Configuration) -> Result { let import_queue = sc_consensus_manual_seal::import_queue( Box::new(block_import.clone()), &task_manager.spawn_essential_handle(), - config.prometheus_registry(), + None, //TODO Re-evaluate this. + // Using None avoids "Failed to register Prometheus metrics: Duplicate metrics collector registration attempted" + // That might just be a warning though. Ultimately the node crashes with "Essential task `basic-block-import-worker` failed. Shutting down service." ); let net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); @@ -83,7 +85,6 @@ pub fn new_dev(mut config: Configuration) -> Result { let select_chain = sc_consensus::LongestChain::new(backend.clone()); let client_set_aside_for_cidp = client.clone(); - let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; // Create channels for mocked XCM messages. // let (downward_xcm_sender, downward_xcm_receiver) = flume::bounded::>(100); @@ -116,12 +117,6 @@ pub fn new_dev(mut config: Configuration) -> Result { async move { let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - let mocked_parachain = MockValidationDataInherentDataProvider { current_para_block, relay_offset: 1000, @@ -133,7 +128,7 @@ pub fn new_dev(mut config: Configuration) -> Result { raw_horizontal_messages: Default::default(), }; - Ok((slot, timestamp, mocked_parachain)) + Ok((timestamp, mocked_parachain)) } }, }),