-
Notifications
You must be signed in to change notification settings - Fork 57
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: libwaku retrieve my enr and adapt golang example #2987
Conversation
You can find the image built from this PR at
Built from 2333ec7 |
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, added one little naming observation...
examples/golang/waku.go
Outdated
C.cGoWakuGetMyENR(self.ctx, resp) | ||
|
||
if C.getRet(resp) == C.RET_OK { | ||
var listenAddresses = C.GoStringN(C.getMyCharPtr(resp), C.int(C.getMyCharLen(resp))) |
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.
Maybe a bit misleading to call it listenAddresses and not the ENR.
I remember that is different also in /debug/info API result.
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, thank you! Added just a tiny question
examples/golang/waku.go
Outdated
var listenAddresses = C.GoStringN(C.getMyCharPtr(resp), C.int(C.getMyCharLen(resp))) | ||
return listenAddresses, nil |
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.
Shouldn't we change the variable name to enr
or something like that? looks like we kept the same variable name after copy-pasting from WakuListenAddresses()
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.
ooh @NagyZoltanPeter added the same comment a few minutes before I did lol. Nice!
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.
Thank you so much guys ! I'll change that
Description
Add new "get ENR" method available in libwaku
Changes
waku_get_my_enr
available inlibwaku
waku_get_my_enr
function