Skip to content

Add TransportRpcModules::add_or_replace_if_module_configured( #19239

@mattsse

Description

@mattsse

Describe the feature

we have:

/// Adds or replaces given [`Methods`] in all configured network modules.
pub fn add_or_replace_configured(
&mut self,
other: impl Into<Methods>,
) -> Result<(), RegisterMethodError> {

but for merge we also have:

/// Merge the given [`Methods`] in all configured transport modules if the given
/// [`RethRpcModule`] is configured for the transport.
///
/// Fails if any of the methods in other is present already.
pub fn merge_if_module_configured(
&mut self,
module: RethRpcModule,
other: impl Into<Methods>,
) -> Result<(), RegisterMethodError> {

we want the same for replace

TODO

  • replicate these fns for add_or_replace_iif_module_configured(:
    /// Adds or replaces given [`Methods`] in all configured network modules.
    pub fn add_or_replace_configured(
    &mut self,
    other: impl Into<Methods>,
    ) -> Result<(), RegisterMethodError> {

assigning @Peponks9

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-rpcRelated to the RPC implementationA-sdkRelated to reth's use as a libraryC-enhancementNew feature or requestD-good-first-issueNice and easy! A great choice to get started

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions