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

fix: actually send the add provider rpc with addresses #201

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

jacobheun
Copy link
Contributor

I was adding some additional tests post #200 which exposed a couple issues with provide calls.

  1. The ADD_PROVIDER rpc was never being sent, as no sync was set up in the pipe. This corrects that with consume.
  2. We weren't adding our addresses to the provider record. We lost this during the peerinfo migration. libp2p@0.28.5 includes a patch to pass libp2p to the dht constructor to give it access. We can simplify the constructor in a future breaking change.

The reason the tests didn't catch this is that the dht connects to and queries the provider, but they can't do this with a dht client, they need to get the provider record from another DHT server. Since the provider record wasn't actually being sent, the new tests failed.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for getting this fixed ❤️

@vasco-santos vasco-santos merged commit f3188be into master Jul 10, 2020
@vasco-santos vasco-santos deleted the fix/add-provider branch July 10, 2020 15:47
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.

3 participants