android: Start wallet no longer looks like a no-op while Cuprate launches #124

Merged
sirius merged 1 commit from onionwire/android-cuprate-start-feedback into main 2026-09-19 16:39:10 +00:00
Owner

Tapping Start wallet on the Cuprate chain source looked like a dead button: status stayed off, no error.

Root cause: Node::start_wallet_child held the SQLCipher mutex across Cuprate Node::launch, so the 2s wallet_status poller blocked, and the UniFFI async start_wallet_child ran that blocking launch on the tokio worker.

This PR:

  • takes the store lock only for RPC creds, after the chain daemon is up
  • spawn_blocking the sync start so UniFFI tokio is not stalled
  • shows Start is running… immediately and disables the button while it is in flight

Does not add mainnet or prune. Cuprate in this APK is still testnet-only.

Verified: cargo test --lib wallet_child:: (22), start_wallet_child_honours_the_configured_binary, root+SDK clippy -D warnings, SDK tests (33). Android unit test needs CI (no local ANDROID_HOME).

Tapping **Start wallet** on the Cuprate chain source looked like a dead button: status stayed `off`, no error. Root cause: `Node::start_wallet_child` held the SQLCipher mutex across Cuprate `Node::launch`, so the 2s `wallet_status` poller blocked, and the UniFFI async `start_wallet_child` ran that blocking launch on the tokio worker. This PR: - takes the store lock only for RPC creds, after the chain daemon is up - `spawn_blocking` the sync start so UniFFI tokio is not stalled - shows `Start is running…` immediately and disables the button while it is in flight Does **not** add mainnet or prune. Cuprate in this APK is still testnet-only. Verified: `cargo test --lib wallet_child::` (22), `start_wallet_child_honours_the_configured_binary`, root+SDK clippy `-D warnings`, SDK tests (33). Android unit test needs CI (no local ANDROID_HOME).
android: Start wallet no longer looks like a no-op while Cuprate launches
All checks were successful
ci / test (pull_request) Successful in 5m34s
ci / sdk (pull_request) Successful in 1m22s
android-ci / android (pull_request) Successful in 10m48s
ci / fuzz (pull_request) Successful in 4m52s
0acf89a0b4
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.
sirius merged commit cd1acd3c0d into main 2026-09-19 16:39:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!124
No description provided.