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
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
Walletstructthread-safe?Currently to "fix" the
thread-safeissue, I use the SQLite db since it allow me to open theWalletmultiple times in different threads, but also in this case I thing that it isn't a good solution.I can't put the
Walletstruct inside anArc<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