Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoind.cpp
Show All 12 Lines | |||||
#include <config.h> | #include <config.h> | ||||
#include <httprpc.h> | #include <httprpc.h> | ||||
#include <init.h> | #include <init.h> | ||||
#include <interfaces/chain.h> | #include <interfaces/chain.h> | ||||
#include <node/context.h> | #include <node/context.h> | ||||
#include <noui.h> | #include <noui.h> | ||||
#include <shutdown.h> | #include <shutdown.h> | ||||
#include <ui_interface.h> | #include <ui_interface.h> | ||||
#include <util/ref.h> | |||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/threadnames.h> | #include <util/threadnames.h> | ||||
#include <util/translation.h> | #include <util/translation.h> | ||||
#include <functional> | #include <functional> | ||||
const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr; | const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr; | ||||
Show All 30 Lines | |||||
// | // | ||||
// Start | // Start | ||||
// | // | ||||
static bool AppInit(int argc, char *argv[]) { | static bool AppInit(int argc, char *argv[]) { | ||||
// FIXME: Ideally, we'd like to build the config here, but that's currently | // FIXME: Ideally, we'd like to build the config here, but that's currently | ||||
// not possible as the whole application has too many global state. However, | // not possible as the whole application has too many global state. However, | ||||
// this is a first step. | // this is a first step. | ||||
auto &config = const_cast<Config &>(GetConfig()); | auto &config = const_cast<Config &>(GetConfig()); | ||||
RPCServer rpcServer; | RPCServer rpcServer; | ||||
HTTPRPCRequestProcessor httpRPCRequestProcessor(config, rpcServer); | |||||
NodeContext node; | NodeContext node; | ||||
util::Ref context{node}; | |||||
HTTPRPCRequestProcessor httpRPCRequestProcessor(config, rpcServer, context); | |||||
bool fRet = false; | bool fRet = false; | ||||
util::ThreadSetInternalName("init"); | util::ThreadSetInternalName("init"); | ||||
// | // | ||||
// Parameters | // Parameters | ||||
// | // | ||||
// If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's | // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |