Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

chore: remove peer-info usage on topology #42

Merged
merged 3 commits into from
Apr 17, 2020

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Apr 7, 2020

In the context of deprecating peer-info as described on libp2p/js-libp2p#589, this PR removes the peer-info usage on topology.

This changes have impact on pubsub modules, as well as the dht

BREAKING CHANGE: topology api now uses peer-id instead of peer-info

BREAKING CHANGE: topology api now uses peer-id instead of peer-info
@vasco-santos vasco-santos force-pushed the chore/remove-peer-info-usage-on-topology branch from d98bc11 to 3daa016 Compare April 16, 2020 14:43
src/topology/README.md Outdated Show resolved Hide resolved
src/topology/multicodec-topology.js Outdated Show resolved Hide resolved
src/topology/index.js Outdated Show resolved Hide resolved
@vasco-santos vasco-santos force-pushed the chore/remove-peer-info-usage-on-topology branch from f767f15 to 0627fa1 Compare April 16, 2020 15:01
@vasco-santos vasco-santos force-pushed the chore/remove-peer-info-usage-on-topology branch from 0627fa1 to e4d4016 Compare April 16, 2020 15:03
@vasco-santos vasco-santos requested a review from jacobheun April 16, 2020 15:08
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple small things (nit can be ignored). This LGTM

src/topology/multicodec-topology.js Outdated Show resolved Hide resolved
for (const peerInfo of peerInfoIterable) {
if (this.multicodecs.filter(multicodec => peerInfo.protocols.has(multicodec)).length) {
_updatePeers (peerDataIterable) {
for (const peerData of peerDataIterable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: exploding the properties might tidy this function up a little.

for (const { id, protocols }  of peerDataIterable) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

@vasco-santos vasco-santos force-pushed the chore/remove-peer-info-usage-on-topology branch from 37ca858 to c46dd73 Compare April 16, 2020 15:26
@vasco-santos vasco-santos merged commit 9d78979 into v0.3.x Apr 17, 2020
@vasco-santos vasco-santos deleted the chore/remove-peer-info-usage-on-topology branch April 17, 2020 15:23
jacobheun pushed a commit that referenced this pull request Apr 21, 2020
* chore: remove peer-info usage on topology

BREAKING CHANGE: topology api now uses peer-id instead of peer-info
jacobheun pushed a commit that referenced this pull request Jun 5, 2020
* chore: remove peer-info usage on topology

BREAKING CHANGE: topology api now uses peer-id instead of peer-info
jacobheun pushed a commit that referenced this pull request Jun 5, 2020
* chore: remove peer-info usage on topology

BREAKING CHANGE: topology api now uses peer-id instead of peer-info
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants