From 235492241f3a4831b59993108ee57bb991ff31a5 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..1afe471 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:)); + + self.#relay_chain_name.build_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?; + self.#relay_chain_name.import_block().map_err(|e| BuilderError::Relaychain(e.into())).map(|_| ())?; + } + Ok(companion) }