*Update bag structure
This commit is contained in:
parent
129141bd8f
commit
e446466c2a
10
src/index.ts
10
src/index.ts
|
@ -1,5 +1,6 @@
|
|||
import DHTOnlineBase from "./dhtOnlineBase.js";
|
||||
import DHTFlood from "@lumeweb/dht-flood";
|
||||
import * as stream from "stream";
|
||||
|
||||
const DISCONNECT_SMOOTH = 500;
|
||||
|
||||
|
@ -9,12 +10,9 @@ export default class DHTOnline extends DHTOnlineBase {
|
|||
|
||||
constructor(
|
||||
swarm: any,
|
||||
{
|
||||
id = swarm.keyPair.publicKey,
|
||||
data = {},
|
||||
protocol = undefined,
|
||||
...opts
|
||||
} = {}
|
||||
{ id = swarm.keyPair.publicKey, data = {}, protocol, ...opts } = {
|
||||
protocol: undefined,
|
||||
}
|
||||
) {
|
||||
super(id, opts);
|
||||
this.flood = new DHTFlood({ id, swarm, protocol, ...opts });
|
||||
|
|
Loading…
Reference in New Issue