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

@@ -13,7 +13,6 @@ use types::{
};
type E = MinimalEthSpec;
type ReqId = usize;
use tempfile::Builder as TempBuilder;
@@ -44,14 +43,14 @@ pub fn fork_context(fork_name: ForkName) -> ForkContext {
}
pub struct Libp2pInstance(
LibP2PService<ReqId, E>,
LibP2PService<E>,
#[allow(dead_code)]
// This field is managed for lifetime purposes may not be used directly, hence the `#[allow(dead_code)]` attribute.
async_channel::Sender<()>,
);
impl std::ops::Deref for Libp2pInstance {
type Target = LibP2PService<ReqId, E>;
type Target = LibP2PService<E>;
fn deref(&self) -> &Self::Target {
&self.0
}
@@ -125,7 +124,7 @@ pub async fn build_libp2p_instance(
}
#[allow(dead_code)]
pub fn get_enr(node: &LibP2PService<ReqId, E>) -> Enr {
pub fn get_enr(node: &LibP2PService<E>) -> Enr {
node.local_enr()
}