-
Notifications
You must be signed in to change notification settings - Fork 471
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
fix: emit peer:connect after all #1171
Conversation
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
This seems fine to me, and a better way to do it since libp2p should make sure it's internal tracking of connections/addresses/etc is done before informing the outside world a new peer has connected to us. I'm a little confused though:
Would you not just open a protocol stream to the peer instead? That aside, CI appears to be failing due to this change - could you please try running the tests locally and ensure they pass? |
what we did is to issue a p2p request in lodestar, which does a
thanks @achingbrain , this is fixed |
Rebase, fix conflicts, add test and lgtm :) |
3899344
to
9687f5e
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, just needs some small improvements to the tests
thanks @achingbrain, this |
The error message is in the CI output:
Basically |
51dda1e
to
3852d69
Compare
Could you rebase/merge master into this branch? It should resolve the last few problems with the build. |
3852d69
to
2da9977
Compare
The fix for the final failing build job was merged as part of #1194 - this is good to go. |
Motivation
In lodestar, when we handle "peer:connect" event, we dial the peer which gives another "peer:connect" event and it causes other issues
Motivation
In
onConnect
function, "peer:connect" event should be emitted after we add connection to theconnections
map so that when app dial the peer in "peer:connect" event handler, it uses the same/existing connection