@@ -76,10 +76,11 @@ use std::{convert::TryFrom, error::Error, fmt::Debug, hash::Hash, sync::Arc, tim
7676use crate :: collator as collator_util;
7777
7878/// Parameters for [`run`].
79- pub struct Params < BI , CIDP , Client , RClient , SO , Proposer , CS > {
79+ pub struct Params < BI , CIDP , Client , Backend , RClient , SO , Proposer , CS > {
8080 pub create_inherent_data_providers : CIDP ,
8181 pub block_import : BI ,
8282 pub para_client : Arc < Client > ,
83+ pub para_backend : Arc < Backend > ,
8384 pub relay_client : Arc < RClient > ,
8485 pub sync_oracle : SO ,
8586 pub keystore : KeystorePtr ,
@@ -94,8 +95,8 @@ pub struct Params<BI, CIDP, Client, RClient, SO, Proposer, CS> {
9495}
9596
9697/// Run async-backing-friendly Aura.
97- pub async fn run < Block , P , BI , CIDP , Client , RClient , SO , Proposer , CS > (
98- params : Params < BI , CIDP , Client , RClient , SO , Proposer , CS > ,
98+ pub async fn run < Block , P , BI , CIDP , Client , Backend , RClient , SO , Proposer , CS > (
99+ params : Params < BI , CIDP , Client , Backend , RClient , SO , Proposer , CS > ,
99100) where
100101 Block : BlockT ,
101102 Client : ProvideRuntimeApi < Block >
@@ -107,6 +108,7 @@ pub async fn run<Block, P, BI, CIDP, Client, RClient, SO, Proposer, CS>(
107108 + Sync
108109 + ' static ,
109110 Client :: Api : AuraApi < Block , P :: Public > + CollectCollationInfo < Block > ,
111+ Backend : sp_blockchain:: Backend < Block > ,
110112 RClient : RelayChainInterface ,
111113 CIDP : CreateInherentDataProviders < Block , ( ) > + ' static ,
112114 BI : BlockImport < Block > + ParachainBlockImportMarker + Send + Sync + ' static ,
@@ -182,12 +184,9 @@ pub async fn run<Block, P, BI, CIDP, Client, RClient, SO, Proposer, CS>(
182184 ignore_alternative_branches : true ,
183185 } ;
184186
185- // TODO [now]: remove this in favor of one passed in as a parameter.
186- let fake_hack: sc_client_api:: in_mem:: Blockchain < Block > = unimplemented ! ( ) ;
187-
188187 let potential_parents = cumulus_client_consensus_common:: find_potential_parents :: < Block > (
189188 parent_search_params,
190- & fake_hack , // sp_blockchain::Backend
189+ & params . para_backend ,
191190 & params. relay_client ,
192191 )
193192 . await ;
0 commit comments