Remove generic Id param from RequestId (#6032)

* rename RequestId's for better context,

and move them to lighthouse_network crate.

* remove unrequired generic AppReqId from RequestID
This commit is contained in:
João Oliveira
2024-07-09 00:56:14 +01:00
committed by GitHub
parent 48c55ae295
commit a59a61fef9
18 changed files with 175 additions and 170 deletions

View File

@@ -28,12 +28,12 @@ use super::network_context::{RpcResponseResult, SyncNetworkContext};
use crate::metrics;
use crate::sync::block_lookups::common::ResponseType;
use crate::sync::block_lookups::parent_chain::find_oldest_fork_ancestor;
use crate::sync::manager::{Id, SingleLookupReqId};
use beacon_chain::block_verification_types::AsBlock;
use beacon_chain::data_availability_checker::AvailabilityCheckErrorCategory;
use beacon_chain::{AvailabilityProcessingStatus, BeaconChainTypes, BlockError};
pub use common::RequestState;
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};
@@ -107,6 +107,9 @@ pub struct BlockLookups<T: BeaconChainTypes> {
log: Logger,
}
#[cfg(test)]
use lighthouse_network::service::api_types::Id;
#[cfg(test)]
/// Tuple of `SingleLookupId`, requested block root, awaiting parent block root (if any),
/// and list of peers that claim to have imported this set of block components.