-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(http): make swarm interface-ipfs-core compliant #489
Conversation
👍 yeah, that sounds good to me too :) |
@diasdavid after some more thought, I actually realised we can just return an array of |
@dignifiedquire I think that keeping the PeerInfo is indeed more powerful and we can always create the map at the CLI level to make the CLI expectation happy. Have in mind though that a lot of these swarm commands will be strongly revisited with libp2p getting more primetime. In other words, what I mean is that if getting PeerInfo objs out of |
it's actually less code to do that, than the other change :) |
09d9f40
to
8145dfb
Compare
8145dfb
to
ef729bb
Compare
@dignifiedquire awesome 💯 Could you also add to this PR the CI tests (uncomment and verify they pass), please? Thank you! |
// TODO | ||
// Needs: https://github.com/ipfs/js-libp2p-ipfs/pull/16 | ||
// test.swarm(common) | ||
|
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.
@diasdavid they are uncommented?
@diasdavid all CI is green with the new versions |
@dignifiedquire sorry, typo, I meant the "CLI" tests here #489 (comment) so that we are sure that |
@diasdavid enabled and fixed the tests :) |
Currently fails on
ipfs swarm addrs
tests.ipfs-api
currently expects to get a map, of addresses indexed by peers. It then flattens it, so that the current results foripfs swarm peers
andipfs swarm addrs
are identical, which makes little sense to me.I suggest keeping
peers
as is, but changingipfs swarm addrs
to return a map as go ipfs does:mapping peer id to available addrs
Fixes #439