hypercore 10.0.0-alpha.28 → 10.0.0-alpha.29

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/replicator.js CHANGED
@@ -1124,11 +1124,13 @@ module.exports = class Replicator {
1124
1124
  }
1125
1125
 
1126
1126
  _clearInflightBlock (tracker, req) {
1127
- const b = tracker.get(req.fork, req.block.index)
1127
+ const isBlock = tracker === this._blocks
1128
+ const index = isBlock === true ? req.block.index : req.hash.index / 2
1129
+ const b = tracker.get(req.fork, index)
1128
1130
 
1129
1131
  if (b === null || removeInflight(b.inflight, req) === false) return
1130
1132
 
1131
- if (b.refs.length > 0 && tracker === this._blocks) {
1133
+ if (b.refs.length > 0 && isBlock === true) {
1132
1134
  this._queueBlock(b)
1133
1135
  return
1134
1136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.0.0-alpha.28",
3
+ "version": "10.0.0-alpha.29",
4
4
  "description": "Hypercore 10",
5
5
  "main": "index.js",
6
6
  "scripts": {