dht-rpc 6.14.1 → 6.14.2

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.
Files changed (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -178,7 +178,7 @@ class DHT extends EventEmitter {
178
178
  toArray (opts) {
179
179
  const limit = (opts && opts.limit)
180
180
  if (limit === 0) return []
181
- return this.nodes.toArray(limit).map(({ host, port }) => ({ host, port }))
181
+ return this.nodes.toArray({ limit, reverse: true }).map(({ host, port }) => ({ host, port }))
182
182
  }
183
183
 
184
184
  ready () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dht-rpc",
3
- "version": "6.14.1",
3
+ "version": "6.14.2",
4
4
  "description": "Make RPC calls over a Kademlia based DHT",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -23,7 +23,7 @@
23
23
  "nat-sampler": "^1.0.1",
24
24
  "sodium-universal": "^4.0.0",
25
25
  "streamx": "^2.13.2",
26
- "time-ordered-set": "^1.0.2",
26
+ "time-ordered-set": "^2.0.0",
27
27
  "udx-native": "^1.5.3"
28
28
  },
29
29
  "devDependencies": {