mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 11:22:56 +00:00
Merge remote-tracking branch 'origin/stable' into unstable-merge-v8
This commit is contained in:
@@ -382,11 +382,9 @@ impl<T: BeaconChainTypes> CustodyBackFillSync<T> {
|
||||
return None;
|
||||
};
|
||||
|
||||
let mut missing_columns = HashSet::new();
|
||||
|
||||
// Skip all batches (Epochs) that don't have missing columns.
|
||||
for epoch in Epoch::range_inclusive_rev(self.to_be_downloaded, column_da_boundary) {
|
||||
missing_columns = self.beacon_chain.get_missing_columns_for_epoch(epoch);
|
||||
let missing_columns = self.beacon_chain.get_missing_columns_for_epoch(epoch);
|
||||
|
||||
if !missing_columns.is_empty() {
|
||||
self.to_be_downloaded = epoch;
|
||||
@@ -445,6 +443,7 @@ impl<T: BeaconChainTypes> CustodyBackFillSync<T> {
|
||||
self.include_next_batch()
|
||||
}
|
||||
Entry::Vacant(entry) => {
|
||||
let missing_columns = self.beacon_chain.get_missing_columns_for_epoch(batch_id);
|
||||
entry.insert(BatchInfo::new(
|
||||
&batch_id,
|
||||
CUSTODY_BACKFILL_EPOCHS_PER_BATCH,
|
||||
@@ -504,6 +503,7 @@ impl<T: BeaconChainTypes> CustodyBackFillSync<T> {
|
||||
run_id: self.run_id,
|
||||
},
|
||||
data_columns,
|
||||
self.cgc,
|
||||
) {
|
||||
crit!(
|
||||
msg = "process_batch",
|
||||
|
||||
@@ -70,16 +70,17 @@ impl<T: BeaconChainTypes> RangeDataColumnBatchRequest<T> {
|
||||
HashMap::new();
|
||||
let mut column_to_peer_id: HashMap<u64, PeerId> = HashMap::new();
|
||||
|
||||
for column in self
|
||||
.requests
|
||||
.values()
|
||||
.filter_map(|req| req.to_finished())
|
||||
.flatten()
|
||||
{
|
||||
received_columns_for_slot
|
||||
.entry(column.slot())
|
||||
.or_default()
|
||||
.push(column.clone());
|
||||
for req in self.requests.values() {
|
||||
let Some(columns) = req.to_finished() else {
|
||||
return None;
|
||||
};
|
||||
|
||||
for column in columns {
|
||||
received_columns_for_slot
|
||||
.entry(column.slot())
|
||||
.or_default()
|
||||
.push(column.clone());
|
||||
}
|
||||
}
|
||||
|
||||
// Note: this assumes that only 1 peer is responsible for a column
|
||||
|
||||
Reference in New Issue
Block a user