-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: dht #480
refactor: dht #480
Conversation
2d93eaf
to
275d873
Compare
* refactor: cleanup core test: auto dial on startup * fix: make hangup work properly * chore: fix lint * chore: apply suggestions from code review Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>
275d873
to
480373d
Compare
src/dht.js
Outdated
dialer: { | ||
dial: (peer, options) => node.dial(peer, options), | ||
dialProtocol: (peer, protocols, options) => { | ||
const recordedPeer = node.peerStore.get(peer.toB58String()) |
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.
When the dial is happening, if we try to dial
using the peer-id
, the peer-info
stored gets replaced, removing the multiaddrs
that previously existed:
https://github.com/libp2p/js-libp2p/blob/refactor/async-await/src/get-peer-info.js#L36-L41
I think we can tackle this once we get rid of peer-info
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.
Looks good! 🚀
* refactor: core async (#478) * refactor: cleanup core test: auto dial on startup * fix: make hangup work properly * chore: fix lint * chore: apply suggestions from code review Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio> * fix: provide libp2p dialer to the dht * chore: use dht release
* refactor: core async (#478) * refactor: cleanup core test: auto dial on startup * fix: make hangup work properly * chore: fix lint * chore: apply suggestions from code review Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio> * fix: provide libp2p dialer to the dht * chore: use dht release
interface was updated here libp2p/js-libp2p#480
Bumps [p-event](https://github.com/sindresorhus/p-event) from 5.0.1 to 6.0.0. - [Release notes](https://github.com/sindresorhus/p-event/releases) - [Commits](sindresorhus/p-event@v5.0.1...v6.0.0) --- updated-dependencies: - dependency-name: p-event dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## [9.3.7](libp2p/js-libp2p-kad-dht@v9.3.6...v9.3.7) (2023-06-15) ### Trivial Changes * Update .github/workflows/semantic-pull-request.yml [skip ci] ([94e4240](libp2p/js-libp2p-kad-dht@94e4240)) * Update .github/workflows/stale.yml [skip ci] ([b081831](libp2p/js-libp2p-kad-dht@b081831)) ### Dependencies * bump p-event from 5.0.1 to 6.0.0 ([libp2p#480](libp2p/js-libp2p-kad-dht#480)) ([ca1fdb7](libp2p/js-libp2p-kad-dht@ca1fdb7))
Async refactor for the new async version of
libp2p-kad-dht
.As discussed on #472 , the
dht
api is provided under_dht
as it should not be directly used.Needs: