From a67cfa5af69161a2270e7f5e553cea48e8afbe0e Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 27 Oct 2024 12:12:08 +0100 Subject: [PATCH] [feat] Made Enr generic with Enr as default --- src/discv5.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/discv5.rs b/src/discv5.rs index 626e9117..7e440fb5 100644 --- a/src/discv5.rs +++ b/src/discv5.rs @@ -82,7 +82,7 @@ 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, { @@ -96,17 +96,17 @@ where /// The local ENR of the server. local_enr: Arc>, /// The key associated with the local ENR, required for updating the local ENR. - enr_key: Arc>, + enr_key: Arc>, // Type of socket we are using ip_mode: IpMode, /// Phantom for the protocol id. _phantom: PhantomData

, } -impl Discv5

{ +impl Discv5 { pub fn new( local_enr: Enr, - enr_key: CombinedKey, + enr_key: K, mut config: Config, ) -> Result { // ensure the keypair matches the one that signed the enr.