@@ -22,7 +22,7 @@ use std::sync::Arc;
2222use task_executor:: TaskExecutor ;
2323use types:: beacon_block_body:: KzgCommitmentOpts ;
2424use types:: blob_sidecar:: { BlobIdentifier , BlobSidecar , FixedBlobSidecarList } ;
25- use types:: { BlobSidecarList , ChainSpec , Epoch , EthSpec , Hash256 , SignedBeaconBlock , Slot } ;
25+ use types:: { BlobSidecarList , ChainSpec , Epoch , EthSpec , Hash256 , SignedBeaconBlock } ;
2626
2727mod availability_view;
2828mod child_components;
@@ -356,41 +356,30 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
356356 /// them here is useful to avoid duplicate downloads of blocks, as well as understanding
357357 /// our blob download requirements. We will also serve this over RPC.
358358 pub fn notify_block ( & self , block_root : Hash256 , block : Arc < SignedBeaconBlock < T :: EthSpec > > ) {
359- let slot = block. slot ( ) ;
360359 self . processing_cache
361360 . write ( )
362361 . entry ( block_root)
363- . or_insert_with ( || ProcessingComponents :: new ( slot ) )
362+ . or_default ( )
364363 . merge_block ( block) ;
365364 }
366365
367366 /// Add a single blob commitment to the processing cache. This commitment is unverified but caching
368367 /// them here is useful to avoid duplicate downloads of blobs, as well as understanding
369368 /// our block and blob download requirements.
370- pub fn notify_gossip_blob (
371- & self ,
372- slot : Slot ,
373- block_root : Hash256 ,
374- blob : & GossipVerifiedBlob < T > ,
375- ) {
369+ pub fn notify_gossip_blob ( & self , block_root : Hash256 , blob : & GossipVerifiedBlob < T > ) {
376370 let index = blob. index ( ) ;
377371 let commitment = blob. kzg_commitment ( ) ;
378372 self . processing_cache
379373 . write ( )
380374 . entry ( block_root)
381- . or_insert_with ( || ProcessingComponents :: new ( slot ) )
375+ . or_default ( )
382376 . merge_single_blob ( index as usize , commitment) ;
383377 }
384378
385379 /// Adds blob commitments to the processing cache. These commitments are unverified but caching
386380 /// them here is useful to avoid duplicate downloads of blobs, as well as understanding
387381 /// our block and blob download requirements.
388- pub fn notify_rpc_blobs (
389- & self ,
390- slot : Slot ,
391- block_root : Hash256 ,
392- blobs : & FixedBlobSidecarList < T :: EthSpec > ,
393- ) {
382+ pub fn notify_rpc_blobs ( & self , block_root : Hash256 , blobs : & FixedBlobSidecarList < T :: EthSpec > ) {
394383 let mut commitments = KzgCommitmentOpts :: < T :: EthSpec > :: default ( ) ;
395384 for blob in blobs. iter ( ) . flatten ( ) {
396385 if let Some ( commitment) = commitments. get_mut ( blob. index as usize ) {
@@ -400,7 +389,7 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
400389 self . processing_cache
401390 . write ( )
402391 . entry ( block_root)
403- . or_insert_with ( || ProcessingComponents :: new ( slot ) )
392+ . or_default ( )
404393 . merge_blobs ( commitments) ;
405394 }
406395
@@ -409,14 +398,6 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
409398 self . processing_cache . write ( ) . remove ( block_root)
410399 }
411400
412- /// Gather all block roots for which we are not currently processing all components for the
413- /// given slot.
414- pub fn incomplete_processing_components ( & self , slot : Slot ) -> Vec < Hash256 > {
415- self . processing_cache
416- . read ( )
417- . incomplete_processing_components ( slot)
418- }
419-
420401 /// The epoch at which we require a data availability check in block processing.
421402 /// `None` if the `Deneb` fork is disabled.
422403 pub fn data_availability_boundary ( & self ) -> Option < Epoch > {
0 commit comments