Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

fix: dont compare empty strings #330

Merged
merged 1 commit into from
Apr 11, 2019
Merged

fix: dont compare empty strings #330

merged 1 commit into from
Apr 11, 2019

Conversation

jacobheun
Copy link
Contributor

@jacobheun jacobheun commented Apr 11, 2019

Currently there is something in the libp2p system that ends up adding /ipfs/{peerId} to our PeerInfo address list. This shouldn't be happening. While this doesn't solve that issue (I'm still determining where that's happening), it fixes an issue with transport address filtering. If any item in the list of ourAddrs happens to be an empty string, that will cause all the target peers addresses to get filtered out. This avoids that by filtering out empty strings from ourAddrs

@ghost ghost assigned jacobheun Apr 11, 2019
@ghost ghost added the in progress label Apr 11, 2019
@jacobheun jacobheun requested review from alanshaw and vasco-santos and removed request for alanshaw April 11, 2019 10:16
@jacobheun
Copy link
Contributor Author

So the address is actually coming from the observed addresses from identify. We're currently just blindly adding any of those to our address list. We should do some level of verification for this. I will add a note to look into this more as a part of libp2p/js-libp2p#202. I think it's a good place to validate we're doing the right thing with addresses.

@jacobheun jacobheun merged commit bb1a235 into master Apr 11, 2019
@jacobheun jacobheun deleted the fix/empty-strings branch April 11, 2019 10:36
@ghost ghost removed the in progress label Apr 11, 2019
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