diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 092d908819..f398f66663 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -1249,11 +1249,7 @@ where _phantom: Default::default(), })), create_inherent_data_providers: move |block: H256, ()| { - let current_para_block = client_set_aside_for_cidp - .number(block) - .expect("Header lookup should succeed") - .expect("Header passed in as parent should be present in backend."); - + let maybe_current_para_block = client_set_aside_for_cidp.number(block); let downward_xcm_receiver = downward_xcm_receiver.clone(); let hrmp_xcm_receiver = hrmp_xcm_receiver.clone(); @@ -1261,6 +1257,9 @@ where async move { let time = sp_timestamp::InherentDataProvider::from_system_time(); + let current_para_block = maybe_current_para_block? + .ok_or(sp_blockchain::Error::UnknownBlock(block.to_string()))?; + let mocked_parachain = MockValidationDataInherentDataProvider { current_para_block, relay_offset: 1000,