parent blob lookups

This commit is contained in:
realbigsean
2023-04-20 19:42:33 -04:00
parent 0cc1704edf
commit bacec52017
7 changed files with 158 additions and 52 deletions

View File

@@ -26,6 +26,7 @@ use crate::beacon_processor::{ChainSegmentProcessId, WorkEvent};
use crate::metrics;
use crate::sync::block_lookups::single_block_lookup::LookupVerifyError;
mod hg5e3wdtrfqa;
mod parent_lookup;
mod single_block_lookup;
#[cfg(test)]
@@ -201,6 +202,23 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
);
}
pub fn search_current_unknown_blob_parent(
&mut self,
blob: Arc<BlobSidecar<T::EthSpec>>,
peer_id: PeerId,
cx: &mut SyncNetworkContext<T>,
) {
let block_root = blob.block_root;
self.search_block_with(
|request| {
let _ = request.add_blob(blob.clone());
},
block_root,
peer_id,
cx,
);
}
/// If a block is attempted to be processed but we do not know its parent, this function is
/// called in order to find the block's parent.
pub fn search_parent(