-
Notifications
You must be signed in to change notification settings - Fork 42
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: use connected peers instead of discovered peers for protocols #1758
Conversation
size-limit report 📦
|
await tearDownNodes(nwaku, waku); | ||
}); | ||
|
||
it("returns all connected peers that support the protocol", async function () { |
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.
Is there an easy way to have a discovered peer that's disconnected? Might be nice to have a test to ensure that peer isn't included
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.
hum can you clarify what you mean?
like for a peer that doesn't support the protocol but is discovered
-- it should not be connected
, right?
--
merging this for now, please feel free or let me know to add a test case for that as a followup
Problem
There is a problem in the peers we choose during a protocol request: we currently get discovered peers while we should be getting and using peers that we have an open connection with.
Solution
Use connected peers instead of discovered peers that might not be connected
Notes
Interesting how we didn't run into any problems with this until now