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

feat(modp2p): Ping and ConnectionState APIs #3989

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

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Dec 9, 2024

Yet another helpful p2p debugging endpoints with respective commands:

  • Ping tries to reach a peer by its peer id
  • ConnectionState provides information about active connection for a peer by its ID

@Wondertan Wondertan self-assigned this Dec 9, 2024
@Wondertan Wondertan added the kind:feat Attached to feature PRs label Dec 9, 2024
@Wondertan Wondertan force-pushed the modp2p/ping-conn-state branch from 1e3b12e to 0c20304 Compare December 9, 2024 19:03
@Wondertan Wondertan enabled auto-merge (squash) December 9, 2024 19:12
return nil, fmt.Errorf("no connections to peer %s", peer)
}

conInfos := make([]ConnectionState, len(cons))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: connStates.

return err
}

pingDuration, err := client.P2P.Ping(cmd.Context(), pid)
Copy link
Contributor

Choose a reason for hiding this comment

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

err not handled

Copy link
Contributor

Choose a reason for hiding this comment

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

OH, it's a param below. Sry.

Copy link
Contributor

@cristaloleg cristaloleg left a comment

Choose a reason for hiding this comment

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

SGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:p2p kind:feat Attached to feature PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants