Skip to content

feat: adding waku_dial_peer and get_connected_peers to libwaku#3149

Merged
gabrielmer merged 7 commits intomasterfrom
feat-add-dialpeer-to-libwaku
Oct 30, 2024
Merged

feat: adding waku_dial_peer and get_connected_peers to libwaku#3149
gabrielmer merged 7 commits intomasterfrom
feat-add-dialpeer-to-libwaku

Conversation

@gabrielmer
Copy link
Copy Markdown
Contributor

@gabrielmer gabrielmer commented Oct 25, 2024

Description

Adding new procedures to libwaku to be able to dial peers using a specific protocol and to be able to retrieve the peerIds of all connected nodes

Changes

  • added waku_dial_peer to libwaku
  • added waku_get_connected_peers to libwaku
  • passing missing parameter in waku_dial_peer_by_id
  • allowing to dial peers without specifying a protocol

Issue

#3076

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 25, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3149

Built from af29e62

@gabrielmer gabrielmer force-pushed the feat-add-dialpeer-to-libwaku branch from b28101e to f76154d Compare October 28, 2024 10:51
@gabrielmer gabrielmer changed the title feat: adding waku_dial_peer to libwaku feat: adding waku_dial_peer and get_connected_peers to libwaku Oct 28, 2024
@gabrielmer gabrielmer marked this pull request as ready for review October 28, 2024 11:07
Copy link
Copy Markdown
Member

@richard-ramos richard-ramos left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Copy Markdown
Collaborator

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

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

Thanks! For it! Just added a couple of comments that I hope you find useful

return err($error)
let conn = await waku.node.peerManager.dialPeer(peerId, $self[].protocol)
if conn.isNone():
if $self[].protocol != "" and conn.isNone():
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How we should handle the condition of $self[].protocol == "" and conn.isNone()?
The same question applies to the DIAL_PEER operation:)

@gabrielmer gabrielmer marked this pull request as draft October 30, 2024 09:28
@gabrielmer gabrielmer force-pushed the feat-add-dialpeer-to-libwaku branch from f76154d to cbd2f83 Compare October 30, 2024 10:58
@gabrielmer gabrielmer marked this pull request as ready for review October 30, 2024 12:44
Copy link
Copy Markdown
Collaborator

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for it! 💯

@gabrielmer gabrielmer merged commit 507b1fc into master Oct 30, 2024
@gabrielmer gabrielmer deleted the feat-add-dialpeer-to-libwaku branch October 30, 2024 14:26
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.

3 participants