libp2p 0.35.5 → 0.35.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dialer/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dialer/index.js"],"names":[],"mappings":";AA6BA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;IACE;;;OAGG;IACH,gJAFW,gBAAgB,GAAG,aAAa,EA4B1C;IAfC,iDAAwC;IACxC,mCAA0B;IAC1B,2BArCsB,OAAO,EAAE,KAAK,OAAO,EAAE,CAqCX;IAClC,yBAAwC;IACxC,uBAAoC;IACpC,gBAA0B;IAC1B,wBAAsC;IACtC,iBAAuE;IACvE,6BAA8B;IAC9B,mCAAoC;IACpC,2CAAuB;IAOzB;;OAEG;IACH,gBAiBC;IAED;;;;;;;;;OASG;IACH,oBALW,MAAM,GAAC,SAAS,GAAC,MAAM;;oBAGrB,QAAQ,UAAU,CAAC,CAwB/B;IAED;;;;;;;OAOG;IACH,mCAHW,MAAM,GAAC,SAAS,GAAC,MAAM,GACrB,QAAQ,UAAU,CAAC,CAqB/B;IAED;;;;;;;;;OASG;IACH,0BAmCC;IAED;;;;;;;;OAQG;IACH,2BAyCC;IAED;;OAEG;IACH,eAFW,MAAM,YAOhB;IAED;;OAEG;IACH,oBAFW,MAAM,QAOhB;IAED;;;;;OAKG;IACH,aAHW,SAAS,GACP,QAAQ,SAAS,EAAE,CAAC,CAwBhC;IAED;;;;;OAKG;IACH,mBAHW,SAAS,GACP,QAAQ,SAAS,EAAE,CAAC,CAWhC;CACF;;;;cA5TY,OAAO,SAAS,CAAC;;;;QAuBhB,MAAM;WACN,SAAS,EAAE;;;eAhBX,SAAS;sBACT,gBAAgB;;;;;;iCAKJ,OAAO,EAAE,KAAK,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;iBAbpC,OAAO,eAAe,CAAC;eACvB,OAAO,4BAA4B,EAAE,OAAO;wBAC5C,OAAO,sBAAsB,CAAC;uBAQxB,SAAS,KAAK,QAAQ,MAAM,EAAE,CAAC;;iBAgBpC,WAAW;gBACX,iBAAiB;aACjB,QAAQ,UAAU,CAAC;mBACR,IAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer-routing.d.ts","sourceRoot":"","sources":["../../src/peer-routing.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"peer-routing.d.ts","sourceRoot":"","sources":["../../src/peer-routing.js"],"names":[],"mappings":";AA6BA;;;;GAIG;AAEH;;;;;;;;;GASG;AAEH;IACE;;;OAGG;IACH,oBAFW,OAAO,IAAI,CAAC,EAgBtB;IAbC,2BAA4B;IAC5B,mCAAkC;IAClC,kCAAkC;IAClC,UADW,iBAAiB,EAAE,CACmB;IAOjD;;;;8BAAwE;IAkB1E;;OAEG;IACH,uCAOC;IAvBD;;OAEG;IACH,cAQC;IAHC,gBAEC;IAeH;;OAEG;IACH,aAEC;IAED;;;;;;;OAOG;IACH,aALW,MAAM;;oBAGJ,QAAQ;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC,CA+B5D;IAED;;;;;;;;OAQG;IACH,qBANW,UAAU;;;oBAIR,cAAc;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC,CAwBlE;CACF;;;;yBA1IY,OAAO,0CAA0C,EAAE,WAAW;;;;;;;;;;;;;;;;;;;cAF9D,OAAO,SAAS,CAAC;iBACjB,OAAO,WAAW,EAAE,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libp2p",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.6",
|
|
4
4
|
"description": "JavaScript implementation of libp2p, a modular peer to peer network stack",
|
|
5
5
|
"leadMaintainer": "Jacob Heun <jacobheun@gmail.com>",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"libp2p-bootstrap": "^0.14.0",
|
|
153
153
|
"libp2p-delegated-content-routing": "^0.11.0",
|
|
154
154
|
"libp2p-delegated-peer-routing": "^0.11.1",
|
|
155
|
-
"libp2p-floodsub": "^0.
|
|
155
|
+
"libp2p-floodsub": "^0.28.0",
|
|
156
156
|
"libp2p-gossipsub": "^0.12.1",
|
|
157
157
|
"libp2p-interfaces-compliance-tests": "^2.0.1",
|
|
158
158
|
"libp2p-interop": "^0.5.0",
|
package/src/dialer/index.js
CHANGED
|
@@ -9,7 +9,8 @@ const { Multiaddr } = require('multiaddr')
|
|
|
9
9
|
const { TimeoutController } = require('timeout-abort-controller')
|
|
10
10
|
const { AbortError } = require('abortable-iterator')
|
|
11
11
|
const { anySignal } = require('any-signal')
|
|
12
|
-
|
|
12
|
+
// @ts-expect-error setMaxListeners is missing from the types
|
|
13
|
+
const { setMaxListeners } = require('events')
|
|
13
14
|
const DialRequest = require('./dial-request')
|
|
14
15
|
const { publicAddressesFirst } = require('libp2p-utils/src/address-sort')
|
|
15
16
|
const getPeer = require('../get-peer')
|
|
@@ -253,6 +254,10 @@ class Dialer {
|
|
|
253
254
|
|
|
254
255
|
// Combine the timeout signal and options.signal, if provided
|
|
255
256
|
const timeoutController = new TimeoutController(this.timeout)
|
|
257
|
+
// this controller will potentially be used while dialing lots of
|
|
258
|
+
// peers so prevent MaxListenersExceededWarning appearing in the console
|
|
259
|
+
setMaxListeners && setMaxListeners(Infinity, timeoutController.signal)
|
|
260
|
+
|
|
256
261
|
const signals = [timeoutController.signal]
|
|
257
262
|
options.signal && signals.push(options.signal)
|
|
258
263
|
const signal = anySignal(signals)
|
package/src/peer-routing.js
CHANGED
|
@@ -24,6 +24,8 @@ const {
|
|
|
24
24
|
// @ts-ignore module with no types
|
|
25
25
|
} = require('set-delayed-interval')
|
|
26
26
|
const { DHTPeerRouting } = require('./dht/dht-peer-routing')
|
|
27
|
+
// @ts-expect-error setMaxListeners is missing from the types
|
|
28
|
+
const { setMaxListeners } = require('events')
|
|
27
29
|
|
|
28
30
|
/**
|
|
29
31
|
* @typedef {import('peer-id')} PeerId
|
|
@@ -149,7 +151,12 @@ class PeerRouting {
|
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
if (options.timeout) {
|
|
152
|
-
|
|
154
|
+
const controller = new TimeoutController(options.timeout)
|
|
155
|
+
// this controller will potentially be used while dialing lots of
|
|
156
|
+
// peers so prevent MaxListenersExceededWarning appearing in the console
|
|
157
|
+
setMaxListeners && setMaxListeners(Infinity, controller.signal)
|
|
158
|
+
|
|
159
|
+
options.signal = controller.signal
|
|
153
160
|
}
|
|
154
161
|
|
|
155
162
|
yield * pipe(
|