mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-01 05:37:05 +00:00
Add da router, and initial logic
This commit is contained in:
@@ -94,13 +94,18 @@ impl<T: BeaconChainTypes> FetchBlobsBeaconAdapter<T> {
|
||||
pub(crate) fn cached_blob_indexes(&self, block_root: &Hash256) -> Option<Vec<u64>> {
|
||||
self.chain
|
||||
.data_availability_checker
|
||||
.v1()
|
||||
.cached_blob_indexes(block_root)
|
||||
}
|
||||
|
||||
pub(crate) fn cached_data_column_indexes(&self, block_root: &Hash256) -> Option<Vec<u64>> {
|
||||
pub(crate) fn cached_data_column_indexes(
|
||||
&self,
|
||||
slot: Slot,
|
||||
block_root: &Hash256,
|
||||
) -> Option<Vec<u64>> {
|
||||
self.chain
|
||||
.data_availability_checker
|
||||
.cached_data_column_indexes(block_root)
|
||||
.cached_data_column_indexes(block_root, slot)
|
||||
}
|
||||
|
||||
pub(crate) async fn process_engine_blobs(
|
||||
|
||||
@@ -402,7 +402,7 @@ async fn compute_custody_columns_to_import<T: BeaconChainTypes>(
|
||||
|
||||
// Only consider columns that are not already known to data availability.
|
||||
if let Some(known_columns) =
|
||||
chain_adapter_cloned.cached_data_column_indexes(&block_root)
|
||||
chain_adapter_cloned.cached_data_column_indexes(block.slot(), &block_root)
|
||||
{
|
||||
custody_columns.retain(|col| !known_columns.contains(&col.index()));
|
||||
if custody_columns.is_empty() {
|
||||
|
||||
@@ -197,7 +197,7 @@ mod get_blobs_v2 {
|
||||
.returning(|_| None);
|
||||
mock_adapter
|
||||
.expect_cached_data_column_indexes()
|
||||
.returning(|_| None);
|
||||
.returning(|_, _| None);
|
||||
mock_process_engine_blobs_result(
|
||||
&mut mock_adapter,
|
||||
Ok(AvailabilityProcessingStatus::Imported(block_root)),
|
||||
|
||||
Reference in New Issue
Block a user