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
dash-spv: the storage worker outlives a DiskStorageManager that is never stopped #1162
DiskStorageManager::new starts the background persistence worker (start_worker, dash-spv/src/storage/mod.rs), a task that writes every storage to disk every 5 seconds. Only StorageManager::stop and clear abort it, and there is no Drop. DashSpvClient::run starts it again, and DashSpvClient::stop stops it.
So a DiskStorageManager dropped without stop, e.g. one passed to a DashSpvClient that never ran, leaves the task alive: it keeps the storages and keeps writing to the directory, even after another manager has opened it. Platform works around it by calling StorageManager::stop right after DiskStorageManager::new (dashpay/platform#5307, rs-platform-wallet/src/spv/runtime.rs).
Fix: start the worker only from start, and abort it on Drop.
Activity
fix(dash-spv): run the storage worker only between start and stop or …