Skip to content
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

Merged
merged 3 commits into from
Nov 26, 2019
Merged

refactor: dht #480

merged 3 commits into from
Nov 26, 2019

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Nov 21, 2019

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:

* 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>
@vasco-santos vasco-santos changed the base branch from master to refactor/async-await November 21, 2019 21:36
@vasco-santos vasco-santos marked this pull request as ready for review November 21, 2019 21:43
src/dht.js Outdated
dialer: {
dial: (peer, options) => node.dial(peer, options),
dialProtocol: (peer, protocols, options) => {
const recordedPeer = node.peerStore.get(peer.toB58String())
Copy link
Member Author

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

src/dht.js Outdated Show resolved Hide resolved
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.

Looks good! 🚀

@jacobheun jacobheun merged commit ed75534 into refactor/async-await Nov 26, 2019
@jacobheun jacobheun deleted the refactor/dht branch November 26, 2019 15:40
jacobheun pushed a commit that referenced this pull request Dec 12, 2019
* 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
jacobheun pushed a commit that referenced this pull request Jan 24, 2020
* 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
kumavis added a commit to ipfs/js-ipfs that referenced this pull request Apr 22, 2020
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
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>
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
## [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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants