@@ -29,7 +29,6 @@ mod error;
2929mod overflow_lru_cache;
3030mod state_lru_cache;
3131
32- use crate :: chain_config:: TestConfig ;
3332use crate :: data_availability_checker:: error:: Error ;
3433use crate :: data_column_verification:: {
3534 CustodyDataColumn , GossipVerifiedDataColumn , KzgVerifiedCustodyDataColumn ,
@@ -87,7 +86,6 @@ pub struct DataAvailabilityChecker<T: BeaconChainTypes> {
8786 kzg : Arc < Kzg > ,
8887 custody_context : Arc < CustodyContext < T :: EthSpec > > ,
8988 spec : Arc < ChainSpec > ,
90- disable_crypto : bool ,
9189}
9290
9391pub type AvailabilityAndReconstructedColumns < E > = ( Availability < E > , DataColumnSidecarList < E > ) ;
@@ -126,7 +124,6 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
126124 kzg : Arc < Kzg > ,
127125 store : BeaconStore < T > ,
128126 custody_context : Arc < CustodyContext < T :: EthSpec > > ,
129- test_config : & TestConfig ,
130127 spec : Arc < ChainSpec > ,
131128 ) -> Result < Self , AvailabilityCheckError > {
132129 let inner = DataAvailabilityCheckerInner :: new (
@@ -142,7 +139,6 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
142139 kzg,
143140 custody_context,
144141 spec,
145- disable_crypto : test_config. disable_crypto ,
146142 } )
147143 }
148144
@@ -382,10 +378,8 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
382378 let ( block_root, block, blobs, data_columns) = block. deconstruct ( ) ;
383379 if self . blobs_required_for_block ( & block) {
384380 return if let Some ( blob_list) = blobs {
385- if !self . disable_crypto {
386- verify_kzg_for_blob_list ( blob_list. iter ( ) , & self . kzg )
387- . map_err ( AvailabilityCheckError :: InvalidBlobs ) ?;
388- }
381+ verify_kzg_for_blob_list ( blob_list. iter ( ) , & self . kzg )
382+ . map_err ( AvailabilityCheckError :: InvalidBlobs ) ?;
389383 Ok ( MaybeAvailableBlock :: Available ( AvailableBlock {
390384 block_root,
391385 block,
@@ -399,15 +393,13 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
399393 }
400394 if self . data_columns_required_for_block ( & block) {
401395 return if let Some ( data_column_list) = data_columns. as_ref ( ) {
402- if !self . disable_crypto {
403- verify_kzg_for_data_column_list (
404- data_column_list
405- . iter ( )
406- . map ( |custody_column| custody_column. as_data_column ( ) ) ,
407- & self . kzg ,
408- )
409- . map_err ( AvailabilityCheckError :: InvalidColumn ) ?;
410- }
396+ verify_kzg_for_data_column_list (
397+ data_column_list
398+ . iter ( )
399+ . map ( |custody_column| custody_column. as_data_column ( ) ) ,
400+ & self . kzg ,
401+ )
402+ . map_err ( AvailabilityCheckError :: InvalidColumn ) ?;
411403 Ok ( MaybeAvailableBlock :: Available ( AvailableBlock {
412404 block_root,
413405 block,
@@ -1203,7 +1195,6 @@ mod test {
12031195 kzg,
12041196 store,
12051197 custody_context,
1206- & TestConfig :: default ( ) ,
12071198 spec,
12081199 )
12091200 . expect ( "should initialise data availability checker" )
0 commit comments