diff --git a/index.js b/index.js index bf38c55..b79c3e8 100644 --- a/index.js +++ b/index.js @@ -487,16 +487,11 @@ class HypercoreStorage { return new MemoryOverlay(this) } - snapshot (sharedLength = -1) { + snapshot () { assert(this.destroyed === false) const s = new HypercoreStorage(this.root, this.discoveryKey, this.corePointer, this.dataPointer, this.db.snapshot()) - for (const dep of this.dependencies) { - const length = sharedLength !== -1 && sharedLength < dep.length ? sharedLength : dep.length - s.dependencies.push({ data: dep.data, length }) - - if (length === sharedLength) break - } + for (const dep of this.dependencies) s.dependencies.push(dep) return s }