mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
clean up claude progress
This commit is contained in:
@@ -607,7 +607,10 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
|
||||
|
||||
let all_data_columns = KzgVerifiedCustodyDataColumn::reconstruct_columns(
|
||||
&self.kzg,
|
||||
&verified_data_columns,
|
||||
verified_data_columns
|
||||
.into_iter()
|
||||
.map(|c| c.into_inner())
|
||||
.collect(),
|
||||
&self.spec,
|
||||
)
|
||||
.map_err(|e| {
|
||||
|
||||
@@ -640,17 +640,11 @@ impl<E: EthSpec> KzgVerifiedCustodyDataColumn<E> {
|
||||
|
||||
pub fn reconstruct_columns(
|
||||
kzg: &Kzg,
|
||||
partial_set_of_columns: &[Self],
|
||||
partial_set_of_columns: Vec<Arc<DataColumnSidecar<E>>>,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<Vec<KzgVerifiedCustodyDataColumn<E>>, KzgError> {
|
||||
let all_data_columns = reconstruct_data_columns(
|
||||
kzg,
|
||||
partial_set_of_columns
|
||||
.iter()
|
||||
.map(|d| d.clone_arc())
|
||||
.collect::<Vec<_>>(),
|
||||
spec,
|
||||
)?;
|
||||
let all_data_columns =
|
||||
reconstruct_data_columns(kzg, partial_set_of_columns.to_vec(), spec)?;
|
||||
|
||||
let seen_timestamp = timestamp_now();
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ impl<T: BeaconChainTypes> PendingPayloadCache<T> {
|
||||
|
||||
let all_data_columns = KzgVerifiedCustodyDataColumn::reconstruct_columns(
|
||||
&self.kzg,
|
||||
&verified_data_columns,
|
||||
verified_data_columns,
|
||||
&self.spec,
|
||||
)
|
||||
.map_err(|e| {
|
||||
@@ -495,7 +495,7 @@ impl<T: BeaconChainTypes> PendingPayloadCache<T> {
|
||||
}
|
||||
|
||||
pending_components.reconstruction_started = true;
|
||||
ReconstructColumnsDecision::Yes(pending_components.get_cached_data_columns(block_root))
|
||||
ReconstructColumnsDecision::Yes(pending_components.get_cached_data_columns(*block_root))
|
||||
}
|
||||
|
||||
/// This could mean some invalid data columns made it through to the `DataAvailabilityChecker`.
|
||||
|
||||
@@ -19,7 +19,7 @@ impl<E: EthSpec> PendingColumn<E> {
|
||||
if let Some(existing_cell) = self.cells.get_mut(index)
|
||||
&& existing_cell.is_none()
|
||||
{
|
||||
*existing_cell = Some((cell.clone(), proof.clone()));
|
||||
*existing_cell = Some((cell.clone(), proof));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ impl<E: EthSpec> PendingColumn<E> {
|
||||
};
|
||||
// TODO(gloas): we likely want to go and arc all cells
|
||||
column.push(cell.clone());
|
||||
kzg_proofs.push(proof.clone());
|
||||
kzg_proofs.push(proof);
|
||||
}
|
||||
|
||||
Some(Arc::new(DataColumnSidecar::Gloas(DataColumnSidecarGloas {
|
||||
|
||||
@@ -8,8 +8,8 @@ use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use tracing::{Span, debug, debug_span};
|
||||
use types::Slot;
|
||||
use types::{ChainSpec, ColumnIndex, Epoch, EthSpec, Hash256};
|
||||
use types::{DataColumnSidecar, Slot};
|
||||
|
||||
/// This represents the components of a payload pending data availability.
|
||||
///
|
||||
@@ -90,8 +90,8 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
|
||||
pub fn num_completed_columns(&self) -> usize {
|
||||
self.verified_data_columns
|
||||
.iter()
|
||||
.filter_map(|(_, col)| col.is_complete(self.num_blobs_expected).then_some(()))
|
||||
.values()
|
||||
.filter_map(|col| col.is_complete(self.num_blobs_expected).then_some(()))
|
||||
.count()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user