MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / WalletController

Method WalletController

src/qt/walletcontroller.cpp:39–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37using wallet::WALLET_FLAG_EXTERNAL_SIGNER;
38
39WalletController::WalletController(ClientModel& client_model, const PlatformStyle* platform_style, QObject* parent)
40 : QObject(parent)
41 , m_activity_thread(new QThread(this))
42 , m_activity_worker(new QObject)
43 , m_client_model(client_model)
44 , m_node(client_model.node())
45 , m_platform_style(platform_style)
46 , m_options_model(client_model.getOptionsModel())
47{
48 m_handler_load_wallet = m_node.walletLoader().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) {
49 getOrCreateWallet(std::move(wallet));
50 });
51
52 m_activity_worker->moveToThread(m_activity_thread);
53 m_activity_thread->start();
54 QTimer::singleShot(0, m_activity_worker, []() {
55 util::ThreadRename("qt-walletctrl");
56 });
57}
58
59// Not using the default destructor because not all member types definitions are
60// available in the header, just forward declared.

Callers

nothing calls this directly

Calls 3

getOptionsModelMethod · 0.45
handleLoadWalletMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected