@@ -184,7 +184,7 @@ pub struct SyncNetworkContext<T: BeaconChainTypes> {
184184 /// Mapping of active custody column requests for a block root
185185 custody_by_root_requests : FnvHashMap < CustodyRequester , ActiveCustodyRequest < T > > ,
186186
187- /// BlocksByRange requests paired with BlobsByRange
187+ /// BlocksByRange requests paired with other ByRange requests for data components
188188 components_by_range_requests :
189189 FnvHashMap < ComponentsByRangeRequestId , RangeBlockComponentsRequest < T :: EthSpec > > ,
190190
@@ -241,7 +241,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
241241 /// Returns the ids of all the requests made to the given peer_id.
242242 pub fn peer_disconnected ( & mut self , peer_id : & PeerId ) -> Vec < SyncRequestId > {
243243 // Note: using destructuring pattern without a default case to make sure we don't forget to
244- // add new request types to the this function. Otherwise, lookup sync can break and lookups
244+ // add new request types to this function. Otherwise, lookup sync can break and lookups
245245 // will get stuck if a peer disconnects during an active requests.
246246 let Self {
247247 network_send : _,
@@ -398,7 +398,6 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
398398 ( None , None )
399399 } ;
400400
401- // TODO(pawan): this would break if a batch contains multiple epochs
402401 let expected_blobs = blobs_req_id. is_some ( ) ;
403402 let info = RangeBlockComponentsRequest :: new (
404403 expected_blobs,
@@ -449,7 +448,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
449448 pub fn range_block_component_response (
450449 & mut self ,
451450 id : ComponentsByRangeRequestId ,
452- block_or_blob : RangeBlockComponent < T :: EthSpec > ,
451+ range_block_component : RangeBlockComponent < T :: EthSpec > ,
453452 ) -> Option < Result < Vec < RpcBlock < T :: EthSpec > > , RpcResponseError > > {
454453 let Entry :: Occupied ( mut entry) = self . components_by_range_requests . entry ( id) else {
455454 metrics:: inc_counter_vec ( & metrics:: SYNC_UNKNOWN_NETWORK_REQUESTS , & [ "range_blocks" ] ) ;
@@ -458,7 +457,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
458457
459458 if let Err ( e) = {
460459 let request = entry. get_mut ( ) ;
461- match block_or_blob {
460+ match range_block_component {
462461 RangeBlockComponent :: Block ( resp) => resp. map ( |( blocks, _) | {
463462 request. add_blocks ( blocks) ;
464463 } ) ,
@@ -1099,7 +1098,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
10991098 id : DataColumnsByRangeRequestId ,
11001099 peer_id : PeerId ,
11011100 rpc_event : RpcEvent < Arc < DataColumnSidecar < T :: EthSpec > > > ,
1102- ) -> Option < RpcResponseResult < Vec < Arc < DataColumnSidecar < T :: EthSpec > > > > > {
1101+ ) -> Option < RpcResponseResult < DataColumnSidecarList < T :: EthSpec > > > {
11031102 let resp = self
11041103 . data_columns_by_range_requests
11051104 . on_response ( id, rpc_event) ;
0 commit comments