From 4f87f45f7df4c3ede4ee32b7e9dc387b3b08059b Mon Sep 17 00:00:00 2001 From: Sean Zellmer Date: Fri, 5 Dec 2025 14:24:03 -0600 Subject: [PATCH] Pass original core as dependency when creating a static core Using the original core as a dependency allows the original core to continue modifying without breaking the static core due to updating head. --- index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e2859ae..6dc9419 100644 --- a/index.js +++ b/index.js @@ -489,7 +489,16 @@ class Corestore extends ReadyResource { key: null, discoveryKey: null, manifest, - core: core.state.storage.core + core: { + ...core.state.storage.core, + dependencies: [ + ...core.state.storage.dependencies, + { + dataPointer: core.state.storage.core.dataPointer, + length: head.length + } + ] + } } c.key = Hypercore.key(c.manifest)