android: Start wallet no longer looks like a no-op while Cuprate launches
Tapping Start held the SQLCipher mutex for the whole in-process Node::launch and blocked the UniFFI tokio worker, so wallet_status stayed off with no error. Drop the store lock until creds are needed, spawn_blocking the sync start, and show that Start is in flight. The APK still runs Cuprate testnet only; this does not add mainnet or prune.
This commit is contained in:
parent
2df10124ef
commit
0acf89a0b4
7 changed files with 103 additions and 34 deletions
10
src/node.rs
10
src/node.rs
|
|
@ -617,10 +617,12 @@ impl Node {
|
|||
cfg.build(self.home.join("wallet"))
|
||||
.map_err(|e| e.to_string())?,
|
||||
);
|
||||
let client = {
|
||||
let store = self.store.lock().map_err(|e| e.to_string())?;
|
||||
child.start(&store).map_err(|e| e.to_string())?
|
||||
};
|
||||
// Do not hold SQLCipher across Cuprate/`monerod` launch: `wallet_status`
|
||||
// also locks the store, and a blocked poller is how Android Start looks
|
||||
// like it did nothing.
|
||||
let client = child
|
||||
.start_unlocking_store(&self.store)
|
||||
.map_err(|e| e.to_string())?;
|
||||
let Some(client) = client else {
|
||||
return Err("chain source is receive-only — nothing to start".into());
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue