From a7162cac11809579ff23f74628a70700075e6a14 Mon Sep 17 00:00:00 2001 From: cdamian <17934949+cdamian@users.noreply.github.com> Date: Wed, 1 Nov 2023 20:50:58 +0100 Subject: [PATCH] companion: Build relay block after onboarding --- core/src/builder/companion/src/expand/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/builder/companion/src/expand/mod.rs b/core/src/builder/companion/src/expand/mod.rs index 29ff9bd..3e9c489 100644 --- a/core/src/builder/companion/src/expand/mod.rs +++ b/core/src/builder/companion/src/expand/mod.rs @@ -120,9 +120,15 @@ pub fn expand(def: CompanionDef) -> SynResult { let collator = companion.#parachain_names.collator(); companion.#relay_chain_name.onboard_para(para, Box::new(collator)).map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?; - )* + { + __hidden_tracing::enter_span!(sp_tracing::Level::TRACE, std::stringify!(#relay_chain_name - BlockBuilding:)); + + companion.#relay_chain_name.build_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?; + companion.#relay_chain_name.import_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?; + } + Ok(companion) }