Skip to content

Subscribe to script hashes when using electrum client #141

@yukibtc

Description

@yukibtc

Hi, I'm working on a project that need to handle multiple descriptors (so multiple BDK wallets) at the same time across threads. Currently I execute a wallet sync every N secs but IMO this is a bad solution.
The best solution could be to execute a full sync at start and then subscribe to script hashes. Is there a way to do this?

And, do you plan to make BDK Wallet struct thread-safe?
Currently to "fix" the thread-safe issue, I use the SQLite db since it allow me to open the Wallet multiple times in different threads, but also in this case I thing that it isn't a good solution.
I can't put the Wallet struct inside an Arc<Mutex<>> because it will block the GUI/CLI since I have to perform a wallet sync every N secs (currently 60 secs).

https://github.com/coinstr/coinstr

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureNew feature or request

    Type

    No type

    Projects

    Status

    Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions