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 NodeTypes: Clone #14345

Open
mattsse opened this issue Feb 9, 2025 · 4 comments · May be fixed by #14351
Open

Make NodeTypes: Clone #14345

mattsse opened this issue Feb 9, 2025 · 4 comments · May be fixed by #14351
Assignees
Labels
A-rpc Related to the RPC implementation A-sdk Related to reth's use as a library C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Feb 9, 2025

Describe the feature

we use this type a lot when restricting trait bounds or using its associated types. We assume this will be stateless because only used to define types, hence we should make this Clone.

/// This trait is intended to be stateless and only define the types of the node.
pub trait NodeTypes: Send + Sync + Unpin + 'static {

this will make it easier for derive(Clone) which would enforce a T: Clone

TODO

  • add Clone to NodeTypes
  • make all impls of NodeTypes Clone

Additional context

No response

@mattsse mattsse added A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started labels Feb 9, 2025
@mattsse mattsse added the A-sdk Related to reth's use as a library label Feb 9, 2025
@Cyber-Mitch
Copy link
Contributor

I can work on this @mattsse

@mattsse
Copy link
Collaborator Author

mattsse commented Feb 9, 2025

assigned @Cyber-Mitch

sorry about #14332 🙁

@Cyber-Mitch
Copy link
Contributor

what

assigned @Cyber-Mitch
sorry about #14332 🙁

Okay @mattsse . No problem thanks. I'm already solving this current issue, will make a PR in few minutes

What about this other issue #14286 you assigned to me initially?

@Cyber-Mitch
Copy link
Contributor

I'm done now. Please check @mattsse #14351

@Cyber-Mitch Cyber-Mitch linked a pull request Feb 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation A-sdk Related to reth's use as a library C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants