Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Enr generic with Enr<CombinedKey> as default #233

Open
emhane opened this issue Feb 8, 2024 · 0 comments
Open

Make Enr generic with Enr<CombinedKey> as default #233

emhane opened this issue Feb 8, 2024 · 0 comments

Comments

@emhane
Copy link
Collaborator

emhane commented Feb 8, 2024

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> { ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant