mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
start fixing up lookup verify error handling
This commit is contained in:
@@ -500,9 +500,9 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
match parent_lookup.verify_block(block, &mut self.failed_chains) {
|
match parent_lookup.verify_block(block, &mut self.failed_chains) {
|
||||||
Ok(Some((block_root, block))) => {
|
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 {
|
match process_or_search {
|
||||||
LookupDownloadStatus::Process(wrapper) => {
|
Ok(LookupDownloadStatus::Process(wrapper)) => {
|
||||||
let chain_hash = parent_lookup.chain_hash();
|
let chain_hash = parent_lookup.chain_hash();
|
||||||
if self
|
if self
|
||||||
.send_block_for_processing(
|
.send_block_for_processing(
|
||||||
@@ -517,10 +517,13 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
self.parent_lookups.push(parent_lookup)
|
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.search_block(block_root, peer_id, PeerShouldHave::BlockAndBlobs, cx);
|
||||||
self.parent_lookups.push(parent_lookup)
|
self.parent_lookups.push(parent_lookup)
|
||||||
}
|
}
|
||||||
|
Err(e) => {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(None) => {
|
Ok(None) => {
|
||||||
|
|||||||
@@ -927,8 +927,8 @@ macro_rules! common_tests {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
use crate::sync::manager::ResponseType::{Blob, Block};
|
use crate::sync::manager::ResponseType::{Blob, Block};
|
||||||
// common_tests!(base, Base, Block);
|
common_tests!(base, Base, Block);
|
||||||
// common_tests!(capella, Capella, Block);
|
common_tests!(capella, Capella, Block);
|
||||||
// common_tests!(deneb, Deneb, Block);
|
common_tests!(deneb, Deneb, Block);
|
||||||
|
|
||||||
common_tests!(deneb, Deneb, Blob);
|
// common_tests!(deneb, Deneb, Blob);
|
||||||
|
|||||||
Reference in New Issue
Block a user