*Mixed up code
This commit is contained in:
parent
1ba371fb1c
commit
4977f88d55
|
@ -8,8 +8,6 @@ import type { EventEmitter } from "eventemitter3";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import Backoff from "backoff.js";
|
import Backoff from "backoff.js";
|
||||||
|
|
||||||
const PROTOCOL = "lumeweb.proxy.handshake";
|
|
||||||
|
|
||||||
export class SwarmClient extends Client {
|
export class SwarmClient extends Client {
|
||||||
private useDefaultSwarm: boolean;
|
private useDefaultSwarm: boolean;
|
||||||
private id: number = 0;
|
private id: number = 0;
|
||||||
|
@ -108,7 +106,7 @@ export class SwarmClient extends Client {
|
||||||
|
|
||||||
public async join(topic: Buffer | Uint8Array | string): Promise<void> {
|
public async join(topic: Buffer | Uint8Array | string): Promise<void> {
|
||||||
if (typeof topic === "string") {
|
if (typeof topic === "string") {
|
||||||
topic = blake2b(PROTOCOL);
|
topic = blake2b(topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._topics.add(topic);
|
this._topics.add(topic);
|
||||||
|
|
Loading…
Reference in New Issue