multiprocess: Delay wallet client construction
Delay wallet client construction until after logging, thread and other
init for two reasons:
- More responsive multiprocess GUI startup. When bitcoin-gui is started
this moves the call from bitcoin-gui to bitcoin-node that spawns
bitcoin-wallet off of the GUI event thread and onto the background GUI
init executor thread.
- Avoids feature_logging.py test failures with bitcoin-node by making
bitcoin-wallet logging start after bitcoin-node logging starts,
because the tests are not written to handle the bitcoin-wallet logging
init code running first.
This partially reverts commit b266b3e0bf,
moving wallet client creation back to the place it was located before.
This commit is contained in:
1 parent
6ef84e0503
commit
ad085f9ba1
8 files changed
+23
-6
No files matched your search
@@ -271,7 +271,6 @@ void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
|
||||
// We don't hold a direct pointer to the splash screen after creation, but the splash
|
||||
// screen will take care of deleting itself when finish() happens.
|
||||
m_splash->show();
|
||||
connect(this, &BitcoinApplication::requestedInitialize, m_splash, &SplashScreen::handleLoadWallet);
|
||||
connect(this, &BitcoinApplication::splashFinished, m_splash, &SplashScreen::finish);
|
||||
connect(this, &BitcoinApplication::requestedShutdown, m_splash, &QWidget::close);
|
||||
}
|
||||
|
||||
@@ -194,6 +194,7 @@ void SplashScreen::subscribeToCoreSignals()
|
||||
// Connect signals to client
|
||||
m_handler_init_message = m_node->handleInitMessage(std::bind(InitMessage, this, std::placeholders::_1));
|
||||
m_handler_show_progress = m_node->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
m_handler_init_wallet = m_node->handleInitWallet([this]() { handleLoadWallet(); });
|
||||
}
|
||||
|
||||
void SplashScreen::handleLoadWallet()
|
||||
|
||||
@@ -66,6 +66,7 @@ private:
|
||||
bool m_shutdown = false;
|
||||
std::unique_ptr<interfaces::Handler> m_handler_init_message;
|
||||
std::unique_ptr<interfaces::Handler> m_handler_show_progress;
|
||||
std::unique_ptr<interfaces::Handler> m_handler_init_wallet;
|
||||
std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
|
||||
std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets;
|
||||
std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers;
|
||||
|
||||
Reference in new issue
Block a user