This PR (re)introduces WalletManager
but follows a different approach than #12587 by @jonasschnelli. It builds on top of #13028 and #13017.
A global g_wallet_manager
instance is also added which is only available in builds with ENABLE_WALLET
.
The goal here is to have a better place for all code that manages wallet instances, which will be useful for:
- wallet lifecycle;
- wallet background tasks coordination (flush for instance);
- src/interface/walletmanager.h for UI and process separation (@ryanofsky sgty?);
- RPC wallet load/unload calls.