*Update dist

This commit is contained in:
Derrick Hammer 2022-12-17 09:07:18 -05:00
parent a3c61e2b66
commit ef4a6f60e9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 16 additions and 15 deletions

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAYlC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAc1C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IAChD,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC;IACrB,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,WAAW,CAAW;IAC9B,OAAO,CAAC,iBAAiB,CAAS;IAElC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAa;gBAGtB,KAAK,EAAE,GAAG,EACV,EACE,EAA4B,EAC5B,iBAAsB,EACtB,GAAG,IAAI,EACR,GAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAO;IAsC7C,OAAO,CAAC,MAAM,CAAc;IAE5B,IAAW,KAAK,IAAI,MAAM,EAAE,CAE3B;IAED,IAAW,QAAQ,IAAI,MAAM,EAAE,CAU9B;IAEM,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;IAOlE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAsBpC,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAIlB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;IA2BjD,OAAO,CAAC,OAAO,CAAc;IAE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BAAuB;IAa/B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAwBtB,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,YAAY;IA8CpB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,WAAW;IA0BnB,OAAO,CAAC,eAAe;IA0BvB,OAAO,CAAC,cAAc;CA2BvB"}

29
dist/index.js vendored
View File

@ -126,20 +126,21 @@ class DHTCache extends events_1.default {
addPeerHandler(peer) {
const id = peer.remotePublicKey;
const stringId = id.toString("hex");
if (this.connectedTo.has(stringId)) {
return;
} // Already know we're connected here
this.connectedTo.add(stringId);
this._ensurePeer(id);
this._addEntityConnection(this.id, id);
this.emit("peer-add", id);
this._recalculate();
this._broadcastMessage({
type: messages_js_1.Type.CONNECTED,
id,
});
this._emitHeartbeat(peer);
this.log.debug(`Relay peer connected: ${stringId}`);
if (!this.connectedTo.has(stringId)) {
this.connectedTo.add(stringId);
}
if (!this._hasSeenEntity(id)) {
this._ensurePeer(id);
this._addEntityConnection(this.id, id);
this.emit("peer-add", id);
this._recalculate();
this._broadcastMessage({
type: messages_js_1.Type.CONNECTED,
id,
});
this._emitHeartbeat(peer);
this.log.debug(`Relay peer connected: ${stringId}`);
}
if (this.bootstrapped) {
return;
}