autobee 2.9.3 → 2.9.5

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/migrations.js CHANGED
@@ -94,7 +94,7 @@ async function checkAutobaseMigration(store, local, bootstrap) {
94
94
 
95
95
  // nothing reads the info here anymore, but a legacy system that will not
96
96
  // decode has to throw for migrateWithFallback pathway
97
- await readLegacySystemInfo(core, length, { wait: false })
97
+ if (length > 0) await readLegacySystemInfo(core, length, { wait: false })
98
98
 
99
99
  const nodes = await Promise.all(
100
100
  catchup.map((n) => getWriterBatch(store, n, bootstrap.key, encryptionKey))
@@ -176,6 +176,7 @@ function decodeLegacySystemInfo(buffer) {
176
176
  state.start--
177
177
 
178
178
  switch (version) {
179
+ case 0:
179
180
  case 1:
180
181
  return SystemInfoV1.decode(state)
181
182
  case 2:
@@ -220,7 +221,7 @@ async function findLocalSystemLength(core, session, systemLength) {
220
221
  length--
221
222
  }
222
223
 
223
- assert(false, 'Expected system block to exist locally')
224
+ return 0
224
225
  }
225
226
 
226
227
  async function sameTree(core, session, length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autobee",
3
- "version": "2.9.3",
3
+ "version": "2.9.5",
4
4
  "description": "Bee based autobase",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Holepunch Inc.",