autobee 2.0.0-rc.21 → 2.0.0-rc.22

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/index.js CHANGED
@@ -436,9 +436,8 @@ module.exports = class Autobee extends ReadyResource {
436
436
  async _bootAll() {
437
437
  if (!(await this._bootReady())) return
438
438
 
439
- for await (const node of this.system.list()) {
440
- if (node.isAnchor) continue
441
- await this.writers.add(node.key)
439
+ for (const head of this.system.heads) {
440
+ await this.writers.add(head.key)
442
441
  }
443
442
  await this._bump()
444
443
  }
package/lib/writers.js CHANGED
@@ -633,7 +633,15 @@ class Writer {
633
633
  const promises = new Array(links.length)
634
634
 
635
635
  for (let i = 0; i < links.length; i++) {
636
- promises[i] = this.system.has(links[i])
636
+ const link = links[i]
637
+
638
+ // legacy batch nodes link their own previous node, satisfied by oplog order
639
+ if (link.length < node.length && b4a.equals(link.key, this.core.key)) {
640
+ promises[i] = true
641
+ continue
642
+ }
643
+
644
+ promises[i] = this.system.has(link)
637
645
  }
638
646
 
639
647
  const has = await Promise.all(promises)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autobee",
3
- "version": "2.0.0-rc.21",
3
+ "version": "2.0.0-rc.22",
4
4
  "description": "Bee based autobase",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Holepunch Inc.",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "brittle": "^4.1.0",
41
- "corestore": "^7.11.0",
41
+ "corestore": "^7.12.2",
42
42
  "hypercore-crypto": "^3.6.1",
43
43
  "lunte": "^1.6.0",
44
44
  "prettier": "^3.8.1",