diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -689,7 +689,7 @@ connect(wallet_controller, &WalletController::walletRemoved, this, &BitcoinGUI::removeWallet); - for (WalletModel *wallet_model : m_wallet_controller->getWallets()) { + for (WalletModel *wallet_model : m_wallet_controller->getOpenWallets()) { addWallet(wallet_model); } } diff --git a/src/qt/walletcontroller.h b/src/qt/walletcontroller.h --- a/src/qt/walletcontroller.h +++ b/src/qt/walletcontroller.h @@ -42,7 +42,8 @@ OptionsModel *options_model, QObject *parent); ~WalletController(); - std::vector getWallets() const; + //! Returns wallet models currently open. + std::vector getOpenWallets() const; //! Returns all wallet names in the wallet dir mapped to whether the wallet //! is loaded. diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -39,7 +39,7 @@ m_activity_thread.wait(); } -std::vector WalletController::getWallets() const { +std::vector WalletController::getOpenWallets() const { QMutexLocker locker(&m_mutex); return m_wallets; }