mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 05:18:30 +00:00
Add sync lookup custody request state (#6257)
* Add sync lookup custody request state * Review PR * clippy * Merge branch 'unstable' of https://github.com/sigp/lighthouse into peerdas-network-lookup
This commit is contained in:
@@ -36,7 +36,7 @@ use fnv::FnvHashMap;
|
||||
use lighthouse_network::service::api_types::SingleLookupReqId;
|
||||
use lighthouse_network::{PeerAction, PeerId};
|
||||
use lru_cache::LRUTimeCache;
|
||||
pub use single_block_lookup::{BlobRequestState, BlockRequestState};
|
||||
pub use single_block_lookup::{BlobRequestState, BlockRequestState, CustodyRequestState};
|
||||
use slog::{debug, error, warn, Logger};
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::sync::Arc;
|
||||
@@ -527,7 +527,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
||||
// if both components have been processed.
|
||||
request_state.on_processing_success()?;
|
||||
|
||||
if lookup.both_components_processed() {
|
||||
if lookup.all_components_processed() {
|
||||
// We don't request for other block components until being sure that the block has
|
||||
// data. If we request blobs / columns to a peer we are sure those must exist.
|
||||
// Therefore if all components are processed and we still receive `MissingComponents`
|
||||
@@ -599,6 +599,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
||||
match R::response_type() {
|
||||
ResponseType::Block => "lookup_block_processing_failure",
|
||||
ResponseType::Blob => "lookup_blobs_processing_failure",
|
||||
ResponseType::CustodyColumn => "lookup_custody_processing_failure",
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user