mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Sync lookup dedup range and blobs (#5561)
* Handle sync range blocks as blocks and blobs * Merge range sync and backfill sync handling * Update tests * Add no_blobs_into_responses test * Address @realbigsean comments * Merge remote-tracking branch 'origin/unstable' into sync-lookup-dedup-range-and-blobs
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
use crate::network_beacon_processor::ChainSegmentProcessId;
|
||||
use crate::sync::manager::{BatchProcessResult, Id};
|
||||
use crate::sync::network_context::RangeRequestId;
|
||||
use crate::sync::network_context::SyncNetworkContext;
|
||||
use crate::sync::range_sync::{
|
||||
BatchConfig, BatchId, BatchInfo, BatchOperationOutcome, BatchProcessingResult, BatchState,
|
||||
@@ -961,7 +962,12 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
) -> Result<(), BackFillError> {
|
||||
if let Some(batch) = self.batches.get_mut(&batch_id) {
|
||||
let (request, is_blob_batch) = batch.to_blocks_by_range_request();
|
||||
match network.backfill_blocks_by_range_request(peer, is_blob_batch, request, batch_id) {
|
||||
match network.blocks_and_blobs_by_range_request(
|
||||
peer,
|
||||
is_blob_batch,
|
||||
request,
|
||||
RangeRequestId::BackfillSync { batch_id },
|
||||
) {
|
||||
Ok(request_id) => {
|
||||
// inform the batch about the new request
|
||||
if let Err(e) = batch.start_downloading_from_peer(peer, request_id) {
|
||||
|
||||
Reference in New Issue
Block a user