Dedup parent blob requests (#5432)

* de dup parent blob requests

* add new line
This commit is contained in:
realbigsean
2024-03-19 20:19:26 -04:00
committed by GitHub
parent eab3672c6d
commit 4449627c7c
2 changed files with 39 additions and 1 deletions

View File

@@ -217,7 +217,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
// Make sure this block is not already downloaded, and that neither it or its parent is
// being searched for.
if let Some(parent_lookup) = self.parent_lookups.iter_mut().find(|parent_req| {
parent_req.contains_block(&block_root) || parent_req.is_for_block(block_root)
parent_req.contains_block(&parent_root) || parent_req.is_for_block(parent_root)
}) {
parent_lookup.add_peer(peer_id);
// we are already searching for this block, ignore it