mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Fix misc PeerDAS todos (#6862)
Address misc PeerDAS TODOs that are not too big for a dedicated PR I'll justify each TODO on an inlined comment
This commit is contained in:
@@ -110,15 +110,6 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
self.get_cached_blobs().iter().flatten().count()
|
||||
}
|
||||
|
||||
/// Checks if a data column of a given index exists in the cache.
|
||||
///
|
||||
/// Returns:
|
||||
/// - `true` if a data column for the given index exists.
|
||||
/// - `false` otherwise.
|
||||
fn data_column_exists(&self, data_column_index: u64) -> bool {
|
||||
self.get_cached_data_column(data_column_index).is_some()
|
||||
}
|
||||
|
||||
/// Returns the number of data columns that have been received and are stored in the cache.
|
||||
pub fn num_received_data_columns(&self) -> usize {
|
||||
self.verified_data_columns.len()
|
||||
@@ -182,8 +173,7 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
kzg_verified_data_columns: I,
|
||||
) -> Result<(), AvailabilityCheckError> {
|
||||
for data_column in kzg_verified_data_columns {
|
||||
// TODO(das): Add equivalent checks for data columns if necessary
|
||||
if !self.data_column_exists(data_column.index()) {
|
||||
if self.get_cached_data_column(data_column.index()).is_none() {
|
||||
self.verified_data_columns.push(data_column);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user