start fixing up lookup verify error handling

This commit is contained in:
realbigsean
2023-04-28 09:54:09 -04:00
parent a9b24bb9df
commit bfb5242ee3
2 changed files with 10 additions and 7 deletions

View File

@@ -500,9 +500,9 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
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<T: BeaconChainTypes> BlockLookups<T> {
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) => {

View File

@@ -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);