11use crate :: domain_block_processor:: DomainBlockProcessor ;
2- use crate :: utils:: translate_number_type;
2+ use crate :: utils:: { translate_number_type, DomainBundles } ;
33use crate :: TransactionFor ;
44use domain_runtime_primitives:: { AccountId , DomainCoreApi } ;
55use sc_client_api:: { AuxStore , BlockBackend } ;
@@ -9,7 +9,7 @@ use sp_blockchain::HeaderBackend;
99use sp_core:: traits:: { CodeExecutor , SpawnNamed } ;
1010use sp_domain_digests:: AsPredigest ;
1111use sp_domain_tracker:: StateRootUpdate ;
12- use sp_domains:: { DomainId , ExecutorApi , OpaqueBundle } ;
12+ use sp_domains:: { DomainId , ExecutorApi } ;
1313use sp_keystore:: SyncCryptoStorePtr ;
1414use sp_runtime:: generic:: BlockId ;
1515use sp_runtime:: traits:: { Block as BlockT , HashFor , Header as HeaderT } ;
6161 }
6262}
6363
64- type CoreBundles < Block , PBlock > =
65- Vec < OpaqueBundle < NumberFor < PBlock > , <PBlock as BlockT >:: Hash , <Block as BlockT >:: Hash > > ;
66-
6764impl < Block , SBlock , PBlock , Client , SClient , PClient , Backend , E >
6865 CoreBundleProcessor < Block , SBlock , PBlock , Client , SClient , PClient , Backend , E >
6966where
@@ -126,7 +123,7 @@ where
126123 NumberFor < PBlock > ,
127124 ForkChoiceStrategy ,
128125 ) ,
129- bundles : CoreBundles < Block , PBlock > ,
126+ bundles : DomainBundles < Block , PBlock > ,
130127 shuffling_seed : Randomness ,
131128 maybe_new_runtime : Option < Cow < ' static , [ u8 ] > > ,
132129 ) -> Result < ( ) , sp_blockchain:: Error > {
@@ -205,9 +202,17 @@ where
205202 fn bundles_to_extrinsics (
206203 & self ,
207204 parent_hash : Block :: Hash ,
208- bundles : CoreBundles < Block , PBlock > ,
205+ bundles : DomainBundles < Block , PBlock > ,
209206 shuffling_seed : Randomness ,
210207 ) -> Result < Vec < Block :: Extrinsic > , sp_blockchain:: Error > {
208+ let bundles = match bundles {
209+ DomainBundles :: System ( ..) => {
210+ return Err ( sp_blockchain:: Error :: Application ( Box :: from (
211+ "Core bundle processor can not process system bundles." ,
212+ ) ) )
213+ }
214+ DomainBundles :: Core ( bundles) => bundles,
215+ } ;
211216 let extrinsics = self
212217 . domain_block_processor
213218 . compile_own_domain_bundles ( bundles) ;
0 commit comments