*Remove unneeded method

This commit is contained in:
Derrick Hammer 2023-03-17 06:16:17 -04:00
parent 3812db6169
commit cb42eae011
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 0 additions and 30 deletions

View File

@ -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;