hypercore 10.30.1 → 10.30.3

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.
package/lib/core.js CHANGED
@@ -707,7 +707,11 @@ module.exports = class Core {
707
707
 
708
708
  const batch = this.tree.verifyFullyRemote(proof)
709
709
 
710
- this._verifyBatchUpgrade(batch, proof.manifest)
710
+ try {
711
+ this._verifyBatchUpgrade(batch, proof.manifest)
712
+ } catch {
713
+ return true
714
+ }
711
715
 
712
716
  const remoteTreeHash = this.crypto.tree(proof.upgrade.nodes)
713
717
  const localTreeHash = this.crypto.tree(await this.tree.getRoots(proof.upgrade.length))
package/lib/replicator.js CHANGED
@@ -11,7 +11,6 @@ const caps = require('./caps')
11
11
  const DEFAULT_MAX_INFLIGHT = [32, 512]
12
12
  const SCALE_LATENCY = 50
13
13
  const DEFAULT_SEGMENT_SIZE = 256 * 1024 * 8 // 256 KiB in bits
14
- const BLOCK_TIMEOUT = 5000
15
14
 
16
15
  const PRIORITY = {
17
16
  NORMAL: 0,
@@ -209,7 +208,6 @@ class InflightTracker {
209
208
  const id = this._free.length ? this._free.pop() : this._requests.push(null)
210
209
 
211
210
  req.id = id
212
- req.timeout = setTimeout(onblocktimeout, BLOCK_TIMEOUT, req)
213
211
  this._requests[id - 1] = req
214
212
  return req
215
213
  }
@@ -790,7 +788,6 @@ class Peer {
790
788
  return {
791
789
  peer: this,
792
790
  id: 0,
793
- timeout: null,
794
791
  fork: this.remoteFork,
795
792
  block: null,
796
793
  hash: null,
@@ -2074,7 +2071,3 @@ function onwirerange (m, c) {
2074
2071
  function onwireextension (m, c) {
2075
2072
  return c.userData.onextension(m)
2076
2073
  }
2077
-
2078
- function onblocktimeout (req) {
2079
- if (req.peer.isActive()) req.peer.stream.destroy(REQUEST_TIMEOUT())
2080
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.30.1",
3
+ "version": "10.30.3",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {