refactor: async routing (#489)

* feat: async routing

* chore: put dht extra api commands under content routing

* chore: add default option to createPeerInfo

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* chore: address review

* chore: rm dlv
This commit is contained in:
Vasco Santos
2019-12-01 22:54:59 +01:00
committed by Jacob Heun
parent b518391a47
commit fc22c36ba7
24 changed files with 805 additions and 228 deletions

View File

@@ -10,7 +10,7 @@ const sinon = require('sinon')
const multiaddr = require('multiaddr')
const { collect } = require('streaming-iterables')
const pipe = require('it-pipe')
const { createPeerInfoFromFixture } = require('../utils/creators/peer')
const { createPeerInfo } = require('../utils/creators/peer')
const baseOptions = require('../utils/base-options')
const Libp2p = require('../../src')
const { codes: Errors } = require('../../src/errors')
@@ -21,7 +21,7 @@ describe('Dialing (via relay, TCP)', () => {
let dstLibp2p
before(async () => {
const peerInfos = await createPeerInfoFromFixture(3)
const peerInfos = await createPeerInfo({ number: 3 })
// Create 3 nodes, and turn HOP on for the relay
;[srcLibp2p, relayLibp2p, dstLibp2p] = peerInfos.map((peerInfo, index) => {
const opts = baseOptions