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.
This commit is contained in:
parent
c7be96a52c
commit
35506534f7
@ -92,7 +92,7 @@ impl AppState {
|
|||||||
rpc_client,
|
rpc_client,
|
||||||
config: inner.config.clone(),
|
config: inner.config.clone(),
|
||||||
genesis_digest: inner.genesis_digest,
|
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));
|
self.0.store(Arc::new(new_inner));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user