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

Install missing eth_ handlers if eth module is selected #1268

Closed
mattsse opened this issue Feb 10, 2023 · 1 comment · Fixed by #1284
Closed

Install missing eth_ handlers if eth module is selected #1268

mattsse opened this issue Feb 10, 2023 · 1 comment · Fixed by #1284
Assignees
Labels
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

Comments

@mattsse
Copy link
Collaborator

mattsse commented Feb 10, 2023

Describe the feature

with #1267 we now have EthPubSub and EthFilter handlers for the eth namespace, which are currently not installed if the eth module is selected.

TODO

install all eth handlers.

Currently only the EthApi handler is installed

RethRpcModule::Eth => self.eth_api().into_rpc().into(),

if we add multiple handlers per namespace, this will break the reth_methods function because now we need to return multiple Methods.

we should refactor this:

for reth_module in config.iter_selection() {
let methods = self.reth_methods(reth_module);
module.merge(methods).expect("No conflicts");
}
module
}
/// Returns the [Methods] for the given [RethRpcModule]
///
/// If this is the first time the namespace is requested, a new instance of API implementation
/// will be created.
pub fn reth_methods(&mut self, namespace: RethRpcModule) -> Methods {

so that reth_methods takes impl Iterator<RethRpcModule> and returns a Vec<Methods> instead.

cc @leruaa

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started A-rpc Related to the RPC implementation labels Feb 10, 2023
@leruaa
Copy link
Contributor

leruaa commented Feb 10, 2023

I can work on this :)

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 C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants