Skip to content

Commit

Permalink
companion: Build relay block after onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Nov 1, 2023
1 parent c779b90 commit 2354922
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/builder/companion/src/expand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,15 @@ pub fn expand(def: CompanionDef) -> SynResult<TokenStream> {
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)
}

Expand Down

0 comments on commit 2354922

Please sign in to comment.