*Bootstrap argument needs to be passed to DHT, not swarm

This commit is contained in:
Derrick Hammer 2022-12-30 18:27:18 -05:00
parent be22b771f5
commit 14edcdc6ce
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 4 deletions

View File

@ -32,10 +32,12 @@ export async function start() {
const address = bootstrap.address() as AddressInfo;
node = new Hyperswarm({
keyPair,
dht: new DHT({ keyPair }),
dht: new DHT({
keyPair,
bootstrap: [{ host: address.address, port: address.port }].concat(
require("@hyperswarm/dht/lib/constants").BOOTSTRAP_NODES
),
}),
});
// @ts-ignore