diff --git a/mutiny-core/src/ldkstorage.rs b/mutiny-core/src/ldkstorage.rs index cd1c8a3d9..e7797fff4 100644 --- a/mutiny-core/src/ldkstorage.rs +++ b/mutiny-core/src/ldkstorage.rs @@ -606,10 +606,8 @@ impl .map_err(|_| lightning::io::ErrorKind::Other.into()) } - fn persist_graph(&self, network_graph: &NetworkGraph) -> Result<(), lightning::io::Error> { - self.storage - .set_data(NETWORK_GRAPH_KEY, network_graph.encode().to_hex(), None) - .map_err(|_| lightning::io::ErrorKind::Other.into()) + fn persist_graph(&self, _network_graph: &NetworkGraph) -> Result<(), lightning::io::Error> { + Ok(()) } fn persist_scorer( diff --git a/mutiny-wasm/src/indexed_db.rs b/mutiny-wasm/src/indexed_db.rs index 336c304b4..631906753 100644 --- a/mutiny-wasm/src/indexed_db.rs +++ b/mutiny-wasm/src/indexed_db.rs @@ -194,6 +194,12 @@ impl IndexedDbStorage { "key from indexedDB is not a string" ))))?; + // we no longer need to read this key, + // so we can remove it from memory + if key == NETWORK_GRAPH_KEY { + continue; + } + let json: Value = value.into_serde()?; map.set(key, json)?; }