-
Notifications
You must be signed in to change notification settings - Fork 9
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(web-chat): peer connected counter #266
Conversation
storePeers: peers | ||
.filter((p) => p.protocols.includes(waku.StoreCodec)) | ||
.map((p) => p.id), | ||
//TODO: use from import |
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.
to be addressed with waku-org/js-waku#1532
//TODO: use from import | ||
filterPeers: peers | ||
.filter((p) => | ||
p.protocols.includes("/vac/waku/filter-subscribe/2.0.0-beta1") |
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.
why not using waku.filter.getPeers
? @danisharora099
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.
@fryorcraken
do you mean peers
? it returns the peers that exist in the peer store for that protocol, and not the peers necessarily we're connected to at the time
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.
we could possible have a method on the BaseProtocol
to fetch connected peers for that protocol
This PR attempts to fix the peers connected counter mismatch identified in #264
protocol.peers()
which returns peers in the peer storepeer:disconnect
handler to remove disconnected peersNotes