Skip to content

dash-spv: the storage worker outlives a DiskStorageManager that is never stopped #1162

Closed

Description

@ZocoLini

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.

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. added a commit that references this issue on Oct 19, 2026
    280b3f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions