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

Avoiding infinite recursion in trait implementation #14261

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

comfsrt
Copy link
Contributor

@comfsrt comfsrt commented Feb 6, 2025

/*
Changes:

  • Replaced:
    Self::add_rlpx_sub_protocol(self, protocol)
    with:
    reth_network::NetworkManager::add_rlpx_sub_protocol(self, protocol)

  • Replaced:
    self.secret_key()
    with:
    reth_network::NetworkManager::secret_key(self)

Reason:
These changes avoid infinite recursion by explicitly calling NetworkManager’s methods instead of the trait’s own implementation.
*/

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes, this should call it like this

ty

@mattsse mattsse added C-bug An unexpected or incorrect behavior A-cli Related to the reth CLI labels Feb 6, 2025
@mattsse mattsse enabled auto-merge February 6, 2025 13:03
@mattsse mattsse added this pull request to the merge queue Feb 6, 2025
Merged via the queue into paradigmxyz:main with commit 2ee7748 Feb 6, 2025
44 checks passed
18aaddy pushed a commit to 18aaddy/reth that referenced this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants