This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
"jsipfs swarm peers" listening all known address instead of used address to connect to that peer #956
Labels
exp/novice
Someone with a little familiarity can pick up
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
status/in-progress
In progress
Comments
victorb
changed the title
"jsipfs swarm peers" returning wrong data
"jsipfs swarm peers" returning connected addresses instead of connected peers
Aug 25, 2017
daviddias
changed the title
"jsipfs swarm peers" returning connected addresses instead of connected peers
"jsipfs swarm peers" listening all known address instead of used address to connect to that peer
Aug 25, 2017
Seems that issue is here: js-ipfs/src/core/components/swarm.js Lines 12 to 45 in a85cf70
The filtering is being done by asserting if we are connected, when instead we should be picking the used address from that same call -- see https://github.com/libp2p/js-peer-info/blob/6fe1352ec9105b3e79c269d7c4b668ec0322d995/src/index.js#L32-L34 --. Looks like a small patch, wanna push a PR? |
daviddias
added
P2
Medium: Good to have, but can wait until someone steps up
exp/novice
Someone with a little familiarity can pick up
help wanted
Seeking public contribution on this issue
labels
Aug 25, 2017
@diasdavid I'll be happy to :) |
Since #960 was merged, this has been fixed |
wwoot! Thank you @victorbjelkholm for handling this one :) |
MicrowaveDev
pushed a commit
to galtproject/js-ipfs
that referenced
this issue
May 22, 2020
License: MIT Signed-off-by: Alan Shaw <[email protected]>
This was referenced Jun 23, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
exp/novice
Someone with a little familiarity can pick up
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
status/in-progress
In progress
Type: Bug
Severity: High
Description:
swarm peers
command (on CLI at least) seems to not be returning the right peers. First problem is that every peer that is connected is being added with each listener, for example, nodeQmVeWHZtuF2fMWDNF8ef2XoToLdyzuH9nwBexKqi4FmXop
would show up as:Instead of just being listed once as expected. Which means
swarm peers | wc -l
will return addresses the node is connected to, instead of peers.Steps to reproduce the error:
jsipfs swarm peers
andjsipfs swarm peers | wc -l
, note down the numberjsipfs swarm peers
andjsipfs swarm peers | wc -l
, compare with previous numberThe text was updated successfully, but these errors were encountered: