From cb42eae011d4902faa16b84135708cf9065f11c6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 17 Mar 2023 06:16:17 -0400 Subject: [PATCH] *Remove unneeded method --- src/peerManager.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/peerManager.ts b/src/peerManager.ts index 51ec2d1..454a32e 100644 --- a/src/peerManager.ts +++ b/src/peerManager.ts @@ -149,36 +149,6 @@ export default class PeerManager { this._peers.delete(pubkey); } } - /* - - private _registerKeyExchangeMessage(peer: Peer, channel: any) { - const self = this; - const message = channel.addMessage({ - encoding: { - preencode(state: any, m: PeerInfoResult) { - fixed32.preencode(state, m.publicKey); - raw.preencode(state, m.libp2pPublicKey); - }, - encode(state: any, m: PeerInfoResult) { - fixed32.encode(state, m.publicKey); - raw.encode(state, m.libp2pPublicKey); - }, - decode(state: any, m: any): Uint8Array { - return fixed32.decode(state, m); - }, - }, - onmessage: async (pubkey: Uint8Array) => { - this.get(peer.socket.remotePublicKey)?.messages.keyExchange?.send({ - publicKey: pubkey, - libp2pPublicKey: (await getIpfsPeerId(self._api)).toBytes(), - }); - }, - }); - this.update(peer.socket.remotePublicKey, { - messages: { keyExchange: message }, - }); - } -*/ private _registerOpenSocketMessage(peer: Peer, channel: any) { const self = this;