-
Notifications
You must be signed in to change notification settings - Fork 54
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
refactor: proper use of setupNat #1740
Conversation
Notice that I had to adapt to use 'rlpx_connected_peers' instead of 'connected_peers' in 'wakunode1.nim' because due to the update of the 'vendor/nim-eth', which adds the dependency-break with 'confutils' but also includes another changes. Aside note: we cannot have 'confutils' dependency in 'nim-eth' because that will prevent the generation of any waku dynamic library.
aabfc4c
to
b2f5172
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! :)
Port(uint16(conf.udpPort) + conf.portsShift)) | ||
if natRes.isErr(): | ||
error "Error in setupNat", error = natRes.error | ||
|
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.
You are calling quit()
in the wakubridge
, but not here - should the reaction be consistent accross apps?
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.
I agree indeed. However, this is consistent within the chat2bridge.nim itself. I think it is better if we raise a separate PR for that.
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.
@vpavlin - Next week I will create a separate PR for adding consistency in the parameters checks for all the apps.
tests/v1/test_waku_connect.nim
Outdated
p1.isNil | ||
p2.isNil == false | ||
p3.isNil == false | ||
p1.isErr() |
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.
In other cases it is xplicitly checking against true
- should we be consistent and do it here as well?
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.
Few comments, but in general LGTM
Description
This PR is aimed to give a better structure to the
setupNat
proc usage, plus update the reference tonim-eth
submodule.The update of
nim-eth
submodule is important to break theconfutils
dependency, and therefore, allow the generation of the waku dynamic library, as intended in: #1730Notice that I had to use
rlpx_connected_peers
instead ofconnected_peers
inwakunode1.nim
due to the update of thevendor/nim-eth
, which not only adds the dependency-break with 'confutils' but also includes another changes.