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

chore: bindings return multiaddress array #2461

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

Ivansete-status
Copy link
Collaborator

@Ivansete-status Ivansete-status commented Feb 20, 2024

Description

Adding new function that helps to extract the multiaddresses the node is listening to. The information is returned as a string with that contains a JSON-array. e.g.: ["/ip4/100.79.7.227/tcp/60001/p2p/16Uiu2HAm2eqzqp6xn32fzgGi8K4BuF88W4Xy6yxsmDcW8h1gj6ie"]

kudos to @richard-ramos! It's been a great pair programming session :)

Changes

  • examples/cbindings/waku_example.c: adapt signatures to accept the recently added void* userData (outside of the scope of this PR.)
  • examples/cbindings/waku_example.c: invoke waku_listen_addresses(ctx, event_handler, userData);
  • library/waku_thread/inter_thread_communication/requests/debug_node_request.nim: new file added.
  • library/libwaku.nim, libwaku.h: waku_listen_addresses implementation

How to test it

  1. make cwaku_example -j11
  2. ./build/cwaku_example --host=0.0.0.0 --peers=/dns4/node-01.do-ams3.wakuv2.test.statusim.net/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ --port=60001 --key=364d111d729a6eb6d2e6113e163f017b5ef03a6f94c9b5b7bb1bb36fa5cb07a9

@Ivansete-status Ivansete-status self-assigned this Feb 20, 2024
Copy link

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2461

Built from 06d9d10

@Ivansete-status Ivansete-status marked this pull request as ready for review February 20, 2024 17:02
Copy link
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.

Instapproved!! 🚀

Copy link
Contributor

@gabrielmer gabrielmer left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! 🤩

@Ivansete-status Ivansete-status merged commit 7aea145 into master Feb 21, 2024
12 checks passed
@Ivansete-status Ivansete-status deleted the bindings-return-multiaddress-array branch February 21, 2024 11:06
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