holepunchto / hyperdht

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

Fix sign with keypair, and add keychain tests #105

Closed LuKks closed 1 year ago

LuKks commented 2 years ago

CI Linux passes (edit: actually it doesn't pass), although locally I get this:

TAP version 13

# createServer with keypear + connect
/self/dht/lib/connect.js:254
    c.encryptedSocket.destroy(attempts ? PEER_CONNECTION_FAILED() : PEER_NOT_FOUND())
                                                                    ^

DHTError: PEER_NOT_FOUND: Peer not found
    at findAndConnect (/self/dht/lib/connect.js:254:69)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async connectAndHolepunch (/self/dht/lib/connect.js:119:3)
Emitted 'error' event on NoiseSecretStream instance at:
    at WritableState.afterDestroy (/self/dht/node_modules/streamx/index.js:444:19)
    at NoiseSecretStream._destroy (/self/dht/node_modules/@hyperswarm/secret-stream/index.js:463:5)
    at WritableState.updateNonPrimary (/self/dht/node_modules/streamx/index.js:189:16)
    at WritableState.update (/self/dht/node_modules/streamx/index.js:174:70)
    at WritableState.afterOpen (/self/dht/node_modules/streamx/index.js:501:27)
    at NoiseSecretStream._predestroy (/self/dht/node_modules/@hyperswarm/secret-stream/index.js:390:7)
    at NoiseSecretStream.destroy (/self/dht/node_modules/streamx/index.js:572:12)
    at findAndConnect (/self/dht/lib/connect.js:254:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async connectAndHolepunch (/self/dht/lib/connect.js:119:3) {
  code: 'PEER_NOT_FOUND'
}
LuKks commented 1 year ago

@mafintosh Ready!