-
Notifications
You must be signed in to change notification settings - Fork 53
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: adding waku_dial_peer and get_connected_peers to libwaku #3149
Conversation
You can find the image built from this PR at
Built from af29e62 |
b28101e
to
f76154d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this 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
of DIAL_PEER_BY_ID: | ||
let peerId = PeerId.init($self[].peerId).valueOr: | ||
error "DIAL_PEER_BY_ID failed", error = $error | ||
return err($error) | ||
let conn = await waku.node.peerManager.dialPeer(peerId, $self[].protocol) | ||
if conn.isNone(): | ||
if $self[].protocol != "" and conn.isNone(): |
There was a problem hiding this comment.
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:)
f76154d
to
cbd2f83
Compare
There was a problem hiding this 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! 💯
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
waku_dial_peer
to libwakuwaku_get_connected_peers
to libwakuwaku_dial_peer_by_id
Issue
#3076