@@ -72,8 +72,8 @@ pub struct Cairo1FeatureContractMetadata {
7272// 2. for each `X.cairo` file in `TEST_CONTRACTS` there exists an `X_compiled.json` file in
7373// `COMPILED_CONTRACTS_SUBDIR` which equals `starknet-compile-deprecated X.cairo --no_debug_info`.
7474async fn verify_feature_contracts_compatibility ( fix : bool , cairo_version : CairoVersion ) {
75- // TODO(Dori, 1/10/2024): Parallelize this test.
7675 match cairo_version {
76+ // TODO(Dori, 1/10/2024): Parallelize Cairo0 recompilation.
7777 CairoVersion :: Cairo0 => {
7878 for contract in FeatureContract :: all_feature_contracts ( )
7979 . filter ( |contract| contract. cairo_version ( ) == cairo_version)
@@ -84,30 +84,20 @@ async fn verify_feature_contracts_compatibility(fix: bool, cairo_version: CairoV
8484 CairoVersion :: Cairo1 ( RunnableCairo1 :: Casm ) => {
8585 // Prepare cairo packages.
8686 let mut download_task_set = tokio:: task:: JoinSet :: new ( ) ;
87- for ( version, _feature_contracts) in
88- FeatureContract :: cairo1_feature_contracts_by_version ( )
89- {
87+ for version in FeatureContract :: all_cairo1_compiler_versions ( ) {
9088 download_task_set. spawn ( async move { verify_cairo1_package ( & version) . await } ) ;
9189 }
9290 info ! (
9391 "Verifying Cairo1 packages for versions {:?}." ,
94- FeatureContract :: cairo1_feature_contracts_by_version ( ) . keys ( )
92+ FeatureContract :: all_cairo1_compiler_versions ( )
9593 ) ;
9694 download_task_set. join_all ( ) . await ;
9795 info ! ( "Cairo1 packages verified." ) ;
9896 // Verify feature contracts.
9997 let mut task_set = tokio:: task:: JoinSet :: new ( ) ;
100- for ( _version, feature_contracts) in
101- FeatureContract :: cairo1_feature_contracts_by_version ( )
102- {
103- for contract in feature_contracts
104- . into_iter ( )
105- . filter ( |contract| contract. cairo_version ( ) == cairo_version)
106- {
107- info ! ( "Spawning task for {contract:?}." ) ;
108- task_set
109- . spawn ( verify_feature_contracts_compatibility_logic_async ( contract, fix) ) ;
110- }
98+ for contract in FeatureContract :: all_cairo1_casm_feature_contracts ( ) {
99+ info ! ( "Spawning task for {contract:?}." ) ;
100+ task_set. spawn ( verify_feature_contracts_compatibility_logic_async ( contract, fix) ) ;
111101 }
112102 info ! ( "Done spawning tasks for contract compilation. Awaiting them..." ) ;
113103 task_set. join_all ( ) . await ;
0 commit comments