holepunchto / hyperdht

The DHT powering Hyperswarm
https://docs.holepunch.to
MIT License
323 stars 46 forks source link

Failing test: manually adding nodes with no bootstrap #77

Open gmaclennan opened 2 years ago

gmaclennan commented 2 years ago

As far as I understand the docs, it should be possible to create a swarm by creating each node without any bootstrap nodes, and then manually adding each node to the routing table. However, this fails with the error:

Error: Too few nodes responded
    at Query._endAfterCommit (./node_modules/dht-rpc/lib/query.js:195:20)
    at Query._flush (./node_modules/dht-rpc/lib/query.js:190:10)
    at Query._readMore (./node_modules/dht-rpc/lib/query.js:175:12)
    at Query._onvisit (./node_modules/dht-rpc/lib/query.js:255:12)
    at IO.onmessage (./node_modules/dht-rpc/lib/io.js:77:13)
    at Socket.emit (node:events:390:28)
    at UDP.onMessage [as onmessage] (node:dgram:939:8)
Emitted 'error' event on Query instance at:
    at ReadableState.afterDestroy (./node_modules/streamx/index.js:442:19)
    at Query._destroy (./node_modules/streamx/index.js:535:5)
    at ReadableState.updateNonPrimary (./node_modules/streamx/index.js:349:16)
    at ReadableState.update (./node_modules/streamx/index.js:333:69)
    at ReadableState.updateReadNT (./node_modules/streamx/index.js:477:8)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

This is a failing test for that issue.