diff --git a/src/discv5.rs b/src/discv5.rs index 626e9117..5120fdb5 100644 --- a/src/discv5.rs +++ b/src/discv5.rs @@ -23,7 +23,7 @@ use crate::{ service::{QueryKind, Service, ServiceRequest, TalkRequest}, Config, DefaultProtocolId, Enr, IpMode, }; -use enr::{CombinedKey, EnrKey, Error as EnrError, NodeId}; +use enr::{CombinedKey, CombinedPublicKey ,EnrKey, Error as EnrError, NodeId}; use parking_lot::RwLock; use std::{ future::Future, @@ -82,9 +82,10 @@ pub enum Event { /// The main Discv5 Service struct. This provides the user-level API for performing queries and /// interacting with the underlying service. -pub struct Discv5
+pub struct Discv5
where
P: ProtocolIdentity,
+ K: EnrKey ,
}
-
-impl {
+impl Discv5
+where
+ P: ProtocolIdentity,
+ K: EnrKey {
}
}
-impl {
+impl {
fn drop(&mut self) {
self.shutdown();
}
diff --git a/src/service.rs b/src/service.rs
index 2661f846..91d1fa6e 100644
--- a/src/service.rs
+++ b/src/service.rs
@@ -17,6 +17,7 @@ use self::{
ip_vote::IpVote,
query_info::{QueryInfo, QueryType},
};
+use enr::EnrKey;
use crate::{
error::{RequestError, ResponseError},
handler::{Handler, HandlerIn, HandlerOut},
@@ -261,7 +262,7 @@ impl Default for NodesResponse {
}
}
-impl Service {
+impl