discv5 icon indicating copy to clipboard operation
discv5 copied to clipboard

Make `Enr` generic with `Enr<CombinedKey>` as default

Open emhane opened this issue 1 year ago • 0 comments

To not limit the flexibility of which key type to use offered by the Enr crate, Enr should be made generic in discv5. The default generic should still be CombinedKey, the key type being used now. This change also requires changing the impl bodies to be extend to work for all types of keys, not just be implemented for the default CombinedKey. This shouldn't be hard because the EnrKey trait is at disposal from the enr crate.

impl<P: ProtocolIdentity, K: EnrKey> Discv5<P, K> { ...

emhane avatar Feb 08 '24 09:02 emhane