dht-rpc 6.12.0 → 6.12.1

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/lib/io.js +1 -2
  2. package/package.json +1 -1
package/lib/io.js CHANGED
@@ -13,7 +13,6 @@ const {
13
13
  const VERSION = 0b11
14
14
  const RESPONSE_ID = (0b0001 << 4) | VERSION
15
15
  const REQUEST_ID = (0b0000 << 4) | VERSION
16
- const TMP = b4a.alloc(32)
17
16
  const EMPTY_ARRAY = []
18
17
 
19
18
  module.exports = class IO {
@@ -498,6 +497,6 @@ function decodeReply (from, state) {
498
497
  }
499
498
 
500
499
  function validateId (id, from) {
501
- const expected = peer.id(from.host, from.port, b4a.alloc(32))
500
+ const expected = peer.id(from.host, from.port, b4a.allocUnsafeSlow(32))
502
501
  return b4a.equals(expected, id) ? expected : null
503
502
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dht-rpc",
3
- "version": "6.12.0",
3
+ "version": "6.12.1",
4
4
  "description": "Make RPC calls over a Kademlia based DHT",
5
5
  "main": "index.js",
6
6
  "files": [