Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

feat: add KadDHT #100

Merged
merged 9 commits into from
Apr 7, 2017
Merged

feat: add KadDHT #100

merged 9 commits into from
Apr 7, 2017

Conversation

daviddias
Copy link
Collaborator

No description provided.

describe('ring', () => {
it('nodeA.dial by Id to node C', (done) => {
nodeA.dial(nodeC.peerInfo.id, done)
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dignifiedquire this simple test is failing with:

 1) .peerRouting ring nodeA.dial by Id to node C:

  Error
      at LookupFailureError (/Users/koruza/code/js-libp2p-kad-dht/src/errors.js:7:1)
      at waterfall (/Users/koruza/code/js-libp2p-kad-dht/src/index.js:454:23)
      at nextTask (/Users/koruza/code/js-libp2p-kad-dht/node_modules/async/waterfall.js:28:14)
      at /Users/koruza/code/js-libp2p-kad-dht/node_modules/async/waterfall.js:22:13
      at apply (/Users/koruza/code/js-libp2p-kad-dht/node_modules/lodash/_apply.js:15:25)
      at /Users/koruza/code/js-libp2p-kad-dht/node_modules/lodash/_overRest.js:32:12
      at /Users/koruza/code/js-libp2p-kad-dht/node_modules/async/internal/onlyOnce.js:12:16
      at setImmediate (/Users/koruza/code/js-libp2p-kad-dht/node_modules/multihashing-async/src/utils.js:8:7)
      at Immediate.<anonymous> (/Users/koruza/code/js-libp2p-kad-dht/node_modules/async/internal/setImmediate.js:26:16)
      at _combinedTickCallback (internal/process/next_tick.js:67:7)
      at process._tickCallback (internal/process/next_tick.js:98:9)

Any clue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added some delay in order to ensure that the network is stabilized (which should not be required) and now I'm getting a different error. The peerRouting.findPeer is returning undefined as the peer and not a error in case of peer not found, making swarm to fail.

expect(providers).length.to.be.above(0)
done()
})
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This one is yielding an empty array of providers immediately, meaning that it failing to find the peer and it is also not respective timeout.


it('nodeA.dial by Id to node C', (done) => {
nodeA.dial(nodeC.peerInfo.id, done)
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

#100 (comment) still persists

@daviddias
Copy link
Collaborator Author

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