From bfb5242ee3617313af839c6d6f730c4de24fc667 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Fri, 28 Apr 2023 09:54:09 -0400 Subject: [PATCH] start fixing up lookup verify error handling --- beacon_node/network/src/sync/block_lookups/mod.rs | 9 ++++++--- beacon_node/network/src/sync/block_lookups/tests.rs | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/beacon_node/network/src/sync/block_lookups/mod.rs b/beacon_node/network/src/sync/block_lookups/mod.rs index 2dd162df9b..826998128f 100644 --- a/beacon_node/network/src/sync/block_lookups/mod.rs +++ b/beacon_node/network/src/sync/block_lookups/mod.rs @@ -500,9 +500,9 @@ impl BlockLookups { match parent_lookup.verify_block(block, &mut self.failed_chains) { Ok(Some((block_root, block))) => { - let process_or_search = parent_lookup.add_block(block_root, block).unwrap(); //TODO(sean) fix + let process_or_search = parent_lookup.add_block(block_root, block); //TODO(sean) fix match process_or_search { - LookupDownloadStatus::Process(wrapper) => { + Ok(LookupDownloadStatus::Process(wrapper)) => { let chain_hash = parent_lookup.chain_hash(); if self .send_block_for_processing( @@ -517,10 +517,13 @@ impl BlockLookups { self.parent_lookups.push(parent_lookup) } } - LookupDownloadStatus::SearchBlock(block_root) => { + Ok(LookupDownloadStatus::SearchBlock(block_root)) => { self.search_block(block_root, peer_id, PeerShouldHave::BlockAndBlobs, cx); self.parent_lookups.push(parent_lookup) } + Err(e) => { + + } } } Ok(None) => { diff --git a/beacon_node/network/src/sync/block_lookups/tests.rs b/beacon_node/network/src/sync/block_lookups/tests.rs index a87ff2b09f..c9c36ce566 100644 --- a/beacon_node/network/src/sync/block_lookups/tests.rs +++ b/beacon_node/network/src/sync/block_lookups/tests.rs @@ -927,8 +927,8 @@ macro_rules! common_tests { }; } use crate::sync::manager::ResponseType::{Blob, Block}; -// common_tests!(base, Base, Block); -// common_tests!(capella, Capella, Block); -// common_tests!(deneb, Deneb, Block); +common_tests!(base, Base, Block); +common_tests!(capella, Capella, Block); +common_tests!(deneb, Deneb, Block); -common_tests!(deneb, Deneb, Blob); +// common_tests!(deneb, Deneb, Blob);