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

Actually ping the node, for reth p2p rlpx ping subcommand #13778

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

int88
Copy link
Contributor

@int88 int88 commented Jan 12, 2025

For reth p2p rlpx ping subcommand, actually ping the node, after getting the hello message.

Ref: #9762 (comment)

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.

I see, we currently don't have a way to just ping via p2pstream

I would rather make this a dedicated function of p2pstream instead and not integrate this oneshot channel

Comment on lines +255 to +257

/// Used to notify ping subcommand.
pong_notifier: Option<oneshot::Sender<()>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

unsure about this additional field

// Only used to notify the ping subcommand.
tx.send(()).unwrap();

return Poll::Ready(Some(Ok(BytesMut::default())));
Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks odd, I don't think we shoudl yield an empty message here.

@int88
Copy link
Contributor Author

int88 commented Jan 13, 2025

I see, we currently don't have a way to just ping via p2pstream

I would rather make this a dedicated function of p2pstream instead and not integrate this oneshot channel

Do you mean direct calls like disconnect, rather than relying on those poll_* functions?

@int88
Copy link
Contributor Author

int88 commented Jan 15, 2025

ping @mattsse

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

Successfully merging this pull request may close these issues.

2 participants