diff --git a/package.json b/package.json index 779bb1d6..36ee89ec 100644 --- a/package.json +++ b/package.json @@ -71,8 +71,8 @@ "iso-random-stream": "^2.0.0", "it-all": "^1.0.5", "it-drain": "^1.0.4", - "libp2p": "^0.32.4", - "libp2p-kad-dht": "^0.24.1", + "libp2p": "libp2p/js-libp2p#feat/update-dht", + "libp2p-kad-dht": "^0.26.1", "libp2p-mplex": "^0.10.2", "libp2p-tcp": "^0.17.1", "lodash.difference": "^4.5.0", diff --git a/test/bitswap.js b/test/bitswap.js index f69417ed..442bbb71 100644 --- a/test/bitswap.js +++ b/test/bitswap.js @@ -22,7 +22,12 @@ import { BitswapMessage as Message } from '../src/message/index.js' */ async function createThing (dht) { const libp2pNode = await createLibp2pNode({ - DHT: dht + DHT: dht, + config: { + dht: { + clientMode: false + } + } }) const bitswap = new Bitswap(libp2pNode, new MemoryBlockstore()) bitswap.start() @@ -182,9 +187,9 @@ describe('bitswap with DHT', function () { // await dht routing table are updated await Promise.all([ - pWaitFor(() => nodes[0].libp2pNode._dht.routingTable.size >= 1), - pWaitFor(() => nodes[1].libp2pNode._dht.routingTable.size >= 2), - pWaitFor(() => nodes[2].libp2pNode._dht.routingTable.size >= 1) + pWaitFor(() => nodes[0].libp2pNode._dht._lan._routingTable.size >= 1), + pWaitFor(() => nodes[1].libp2pNode._dht._lan._routingTable.size >= 2), + pWaitFor(() => nodes[2].libp2pNode._dht._lan._routingTable.size >= 1) ]) })