Skip to content

Commit

Permalink
Add extra aura check
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 committed Jun 3, 2024
1 parent dade327 commit 8905ab5
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions cumulus/polkadot-parachain/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -832,14 +832,14 @@ fn start_relay_chain_consensus(
}

/// Start consensus using the lookahead aura collator.
fn start_lookahead_aura_consensus(
client: Arc<ParachainClient<FakeRuntimeApi>>,
block_import: ParachainBlockImport<FakeRuntimeApi>,
fn start_lookahead_aura_consensus<RuntimeApi>(
client: Arc<ParachainClient<RuntimeApi>>,
block_import: ParachainBlockImport<RuntimeApi>,
prometheus_registry: Option<&Registry>,
telemetry: Option<TelemetryHandle>,
task_manager: &TaskManager,
relay_chain_interface: Arc<dyn RelayChainInterface>,
transaction_pool: Arc<sc_transaction_pool::FullPool<Block, ParachainClient<FakeRuntimeApi>>>,
transaction_pool: Arc<sc_transaction_pool::FullPool<Block, ParachainClient<RuntimeApi>>>,
sync_oracle: Arc<SyncingService<Block>>,
keystore: KeystorePtr,
relay_chain_slot_duration: Duration,
Expand All @@ -848,7 +848,16 @@ fn start_lookahead_aura_consensus(
overseer_handle: OverseerHandle,
announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
backend: Arc<ParachainBackend>,
) -> Result<(), sc_service::Error> {
) -> Result<(), sc_service::Error>
where
RuntimeApi: ConstructNodeRuntimeApi<Block, ParachainClient<RuntimeApi>>,
RuntimeApi::RuntimeApi: AuraRuntimeApi<Block, AuraId>,
{
let info = backend.blockchain().info();
if !client.runtime_api().has_aura_apis(info.finalized_hash) {
return Err(sc_service::error::Error::Other("Missing aura runtime APIs".to_string()));
}

let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
task_manager.spawn_handle(),
client.clone(),
Expand Down

0 comments on commit 8905ab5

Please sign in to comment.