Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show All 24 Lines | |||||
#include <qt/platformstyle.h> | #include <qt/platformstyle.h> | ||||
#include <qt/splashscreen.h> | #include <qt/splashscreen.h> | ||||
#include <qt/utilitydialog.h> | #include <qt/utilitydialog.h> | ||||
#include <qt/winshutdownmonitor.h> | #include <qt/winshutdownmonitor.h> | ||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <ui_interface.h> | #include <ui_interface.h> | ||||
#include <uint256.h> | #include <uint256.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/threadnames.h> | |||||
#include <walletinitinterface.h> | #include <walletinitinterface.h> | ||||
#include <warnings.h> | #include <warnings.h> | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
#include <qt/paymentserver.h> | #include <qt/paymentserver.h> | ||||
#include <qt/walletcontroller.h> | #include <qt/walletcontroller.h> | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | void BitcoinABC::handleRunawayException(const std::exception *e) { | ||||
PrintExceptionContinue(e, "Runaway exception"); | PrintExceptionContinue(e, "Runaway exception"); | ||||
Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings("gui"))); | Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings("gui"))); | ||||
} | } | ||||
void BitcoinABC::initialize(Config *config, RPCServer *rpcServer, | void BitcoinABC::initialize(Config *config, RPCServer *rpcServer, | ||||
HTTPRPCRequestProcessor *httpRPCRequestProcessor) { | HTTPRPCRequestProcessor *httpRPCRequestProcessor) { | ||||
try { | try { | ||||
qDebug() << __func__ << ": Running initialization in thread"; | qDebug() << __func__ << ": Running initialization in thread"; | ||||
util::ThreadRename("qt-init"); | |||||
bool rv = | bool rv = | ||||
m_node.appInitMain(*config, *rpcServer, *httpRPCRequestProcessor); | m_node.appInitMain(*config, *rpcServer, *httpRPCRequestProcessor); | ||||
Q_EMIT initializeResult(rv); | Q_EMIT initializeResult(rv); | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
handleRunawayException(&e); | handleRunawayException(&e); | ||||
} catch (...) { | } catch (...) { | ||||
handleRunawayException(nullptr); | handleRunawayException(nullptr); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 335 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
int GuiMain(int argc, char *argv[]) { | int GuiMain(int argc, char *argv[]) { | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
util::WinCmdLineArgs winArgs; | util::WinCmdLineArgs winArgs; | ||||
std::tie(argc, argv) = winArgs.get(); | std::tie(argc, argv) = winArgs.get(); | ||||
#endif | #endif | ||||
SetupEnvironment(); | SetupEnvironment(); | ||||
util::ThreadRename("main"); | |||||
std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); | std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(); | ||||
// Do not refer to data directory yet, this can be overridden by | // Do not refer to data directory yet, this can be overridden by | ||||
// Intro::pickDataDirectory | // Intro::pickDataDirectory | ||||
/// 1. Basic Qt initialization (not dependent on parameters or | /// 1. Basic Qt initialization (not dependent on parameters or | ||||
/// configuration) | /// configuration) | ||||
▲ Show 20 Lines • Show All 219 Lines • Show Last 20 Lines |