From 35506534f78331f256b51821b0c9d7314bcb64af Mon Sep 17 00:00:00 2001 From: Alan Szepieniec Date: Wed, 13 Aug 2025 22:26:48 +0200 Subject: [PATCH] fix: Copy cache pointer on RPC client reset The disappearing cache was the result of creating a new smart pointer to a new cache every time the RPC client was switched. Fixed by cloning the smart pointer to the cache whenever the RPC client gets reset. No need for persistence. --- src/model/app_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/app_state.rs b/src/model/app_state.rs index 0f880de..6d88ecb 100644 --- a/src/model/app_state.rs +++ b/src/model/app_state.rs @@ -92,7 +92,7 @@ impl AppState { rpc_client, config: inner.config.clone(), genesis_digest: inner.genesis_digest, - transparent_utxos_cache: Arc::new(Mutex::new(vec![])), + transparent_utxos_cache: inner.transparent_utxos_cache.clone(), }; self.0.store(Arc::new(new_inner)); }