You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(platform-wallet-ffi): release the HandleStorage registry guard before block_on in parking exports #4610
HandleStorage::with_item (rs-platform-wallet-ffi/src/handle.rs ~66-72) holds the registry's parking_lot::RwLockread guard for the whole closure, and several exports block_on inside that closure: platform_wallet_manager_sync_progress, ..spv_connected_peers, ..spv_tip_unix_seconds (spv.rs ~146/298/373) and platform_wallet_pending_contact_crypto_count (dashpay.rs ~993-996, waits on wallet_manager.read()).
Consequences: platform_wallet_manager_destroy / platform_wallet_destroy (remove = registry write) wait behind any parked call, and parking_lot's writer preference then blocks every new registry reader (every FFI call on that registry) until the parked call returns — measured on iOS as teardown queued behind a 2-minute pending_contact_crypto_count.
Proposal
Clone the Arc out of the registry under the guard and run block_on / block_on_worker after the guard is released, for every export that can park.
Fixed: platform_wallet_pending_contact_crypto_count (rs-platform-wallet-ffi/src/dashpay.rs) and the SPV read exports (sync_progress, connected_peers, tip_unix_seconds in spv.rs) now clone the Arc under the registry guard and wait outside it, as proposed here. Landed with #4611 and the follow-up FFI changes on v5.x-dev.
Activity
Revert "fix(platform-wallet): persist periodic-sync changesets after …
fix(platform-wallet-ffi): block outside the handle registry guard in …
fix(platform-wallet-ffi): block outside the registry guard in the unl…
llbartekll commentedon Nov 4, 2026
Fixed:
platform_wallet_pending_contact_crypto_count(rs-platform-wallet-ffi/src/dashpay.rs) and the SPV read exports (sync_progress,connected_peers,tip_unix_secondsinspv.rs) now clone theArcunder the registry guard and wait outside it, as proposed here. Landed with #4611 and the follow-up FFI changes on v5.x-dev.