From 4be66c02909e695296ea50d78dbab48ab5cef177 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert <skunert49@gmail.com> Date: Thu, 16 Jan 2025 11:21:44 +0100 Subject: [PATCH] Always allow building on the included block. --- cumulus/client/consensus/aura/src/collators/mod.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cumulus/client/consensus/aura/src/collators/mod.rs b/cumulus/client/consensus/aura/src/collators/mod.rs index 031fa963ba6..ce83521bb19 100644 --- a/cumulus/client/consensus/aura/src/collators/mod.rs +++ b/cumulus/client/consensus/aura/src/collators/mod.rs @@ -179,12 +179,14 @@ where let authorities = runtime_api.authorities(parent_hash).ok()?; let author_pub = aura_internal::claim_slot::<P>(para_slot, &authorities, keystore).await?; - let Ok(Some(api_version)) = - runtime_api.api_version::<dyn AuraUnincludedSegmentApi<Block>>(parent_hash) - else { - return (parent_hash == included_block) - .then(|| SlotClaim::unchecked::<P>(author_pub, para_slot, timestamp)); - }; + if parent_hash == included_block { + return Some(SlotClaim::unchecked::<P>(author_pub, para_slot, timestamp)); + } + + let api_version = runtime_api + .api_version::<dyn AuraUnincludedSegmentApi<Block>>(parent_hash) + .ok() + .flatten()?; let slot = if api_version > 1 { relay_slot } else { para_slot }; -- GitLab