mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 19:02:42 +00:00
Drop lookup type trait for a simple arg (#5620)
* Drop lookup type trait for a simple arg
This commit is contained in:
@@ -42,7 +42,6 @@ use super::range_sync::{RangeSync, RangeSyncType, EPOCHS_PER_BATCH};
|
||||
use crate::network_beacon_processor::{ChainSegmentProcessId, NetworkBeaconProcessor};
|
||||
use crate::service::NetworkMessage;
|
||||
use crate::status::ToStatusMessage;
|
||||
use crate::sync::block_lookups::common::{Current, Parent};
|
||||
use crate::sync::block_lookups::{BlobRequestState, BlockRequestState};
|
||||
use crate::sync::block_sidecar_coupling::BlocksAndBlobsRequestInfo;
|
||||
use beacon_chain::block_verification_types::AsBlock;
|
||||
@@ -621,14 +620,14 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
} => match process_type {
|
||||
BlockProcessType::SingleBlock { id } => self
|
||||
.block_lookups
|
||||
.single_block_component_processed::<BlockRequestState<Current>>(
|
||||
.single_block_component_processed::<BlockRequestState>(
|
||||
id,
|
||||
result,
|
||||
&mut self.network,
|
||||
),
|
||||
BlockProcessType::SingleBlob { id } => self
|
||||
.block_lookups
|
||||
.single_block_component_processed::<BlobRequestState<Current, T::EthSpec>>(
|
||||
.single_block_component_processed::<BlobRequestState<T::EthSpec>>(
|
||||
id,
|
||||
result,
|
||||
&mut self.network,
|
||||
@@ -834,7 +833,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
Ok((block, seen_timestamp)) => match id.lookup_type {
|
||||
LookupType::Current => self
|
||||
.block_lookups
|
||||
.single_lookup_response::<BlockRequestState<Current>>(
|
||||
.single_lookup_response::<BlockRequestState>(
|
||||
id,
|
||||
peer_id,
|
||||
block,
|
||||
@@ -843,7 +842,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
),
|
||||
LookupType::Parent => self
|
||||
.block_lookups
|
||||
.parent_lookup_response::<BlockRequestState<Parent>>(
|
||||
.parent_lookup_response::<BlockRequestState>(
|
||||
id,
|
||||
peer_id,
|
||||
block,
|
||||
@@ -854,7 +853,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
Err(error) => match id.lookup_type {
|
||||
LookupType::Current => self
|
||||
.block_lookups
|
||||
.single_block_lookup_failed::<BlockRequestState<Current>>(
|
||||
.single_block_lookup_failed::<BlockRequestState>(
|
||||
id,
|
||||
&peer_id,
|
||||
&mut self.network,
|
||||
@@ -862,7 +861,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
),
|
||||
LookupType::Parent => self
|
||||
.block_lookups
|
||||
.parent_lookup_failed::<BlockRequestState<Parent>>(
|
||||
.parent_lookup_failed::<BlockRequestState>(
|
||||
id,
|
||||
&peer_id,
|
||||
&mut self.network,
|
||||
@@ -909,7 +908,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
Ok((blobs, seen_timestamp)) => match id.lookup_type {
|
||||
LookupType::Current => self
|
||||
.block_lookups
|
||||
.single_lookup_response::<BlobRequestState<Current, T::EthSpec>>(
|
||||
.single_lookup_response::<BlobRequestState<T::EthSpec>>(
|
||||
id,
|
||||
peer_id,
|
||||
blobs,
|
||||
@@ -918,7 +917,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
),
|
||||
LookupType::Parent => self
|
||||
.block_lookups
|
||||
.parent_lookup_response::<BlobRequestState<Parent, T::EthSpec>>(
|
||||
.parent_lookup_response::<BlobRequestState<T::EthSpec>>(
|
||||
id,
|
||||
peer_id,
|
||||
blobs,
|
||||
@@ -930,7 +929,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
Err(error) => match id.lookup_type {
|
||||
LookupType::Current => self
|
||||
.block_lookups
|
||||
.single_block_lookup_failed::<BlobRequestState<Current, T::EthSpec>>(
|
||||
.single_block_lookup_failed::<BlobRequestState<T::EthSpec>>(
|
||||
id,
|
||||
&peer_id,
|
||||
&mut self.network,
|
||||
@@ -938,7 +937,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
),
|
||||
LookupType::Parent => self
|
||||
.block_lookups
|
||||
.parent_lookup_failed::<BlobRequestState<Parent, T::EthSpec>>(
|
||||
.parent_lookup_failed::<BlobRequestState<T::EthSpec>>(
|
||||
id,
|
||||
&peer_id,
|
||||
&mut self.network,
|
||||
|
||||
Reference in New Issue
Block a user