mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Add sync lookup custody request state (#6257)
* Add sync lookup custody request state * Review PR * clippy * Merge branch 'unstable' of https://github.com/sigp/lighthouse into peerdas-network-lookup
This commit is contained in:
@@ -13,7 +13,7 @@ use ssz_types::{FixedVector, VariableList};
|
||||
use std::num::NonZeroUsize;
|
||||
use std::sync::Arc;
|
||||
use types::blob_sidecar::BlobIdentifier;
|
||||
use types::{BlobSidecar, ChainSpec, Epoch, EthSpec, Hash256, SignedBeaconBlock};
|
||||
use types::{BlobSidecar, ChainSpec, ColumnIndex, Epoch, EthSpec, Hash256, SignedBeaconBlock};
|
||||
|
||||
/// This represents the components of a partially available block
|
||||
///
|
||||
@@ -108,6 +108,14 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
self.verified_data_columns.len()
|
||||
}
|
||||
|
||||
/// Returns the indices of cached custody columns
|
||||
pub fn get_cached_data_columns_indices(&self) -> Vec<ColumnIndex> {
|
||||
self.verified_data_columns
|
||||
.iter()
|
||||
.map(|d| d.index())
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Inserts a block into the cache.
|
||||
pub fn insert_block(&mut self, block: DietAvailabilityPendingExecutedBlock<E>) {
|
||||
*self.get_cached_block_mut() = Some(block)
|
||||
|
||||
Reference in New Issue
Block a user