Bitcoin
|
#include <init.h>
#include <addrman.h>
#include <amount.h>
#include <banman.h>
#include <blockfilter.h>
#include <chain.h>
#include <chainparams.h>
#include <compat/sanity.h>
#include <consensus/validation.h>
#include <fs.h>
#include <httpserver.h>
#include <httprpc.h>
#include <index/blockfilterindex.h>
#include <interfaces/chain.h>
#include <index/txindex.h>
#include <key.h>
#include <validation.h>
#include <miner.h>
#include <netbase.h>
#include <net.h>
#include <net_processing.h>
#include <policy/feerate.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <policy/settings.h>
#include <rpc/server.h>
#include <rpc/register.h>
#include <rpc/blockchain.h>
#include <rpc/util.h>
#include <script/standard.h>
#include <script/sigcache.h>
#include <scheduler.h>
#include <shutdown.h>
#include <util/threadnames.h>
#include <timedata.h>
#include <txdb.h>
#include <txmempool.h>
#include <torcontrol.h>
#include <ui_interface.h>
#include <util/system.h>
#include <util/moneystr.h>
#include <util/validation.h>
#include <validationinterface.h>
#include <walletinitinterface.h>
#include <stdint.h>
#include <stdio.h>
#include <attributes.h>
#include <cerrno>
#include <signal.h>
#include <sys/stat.h>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/thread.hpp>
Classes | |
class | CCoinsViewErrorCatcher |
struct | CImportingNow |
Namespaces | |
anonymous_namespace{init.cpp} | |
Macros | |
#define | MIN_CORE_FILEDESCRIPTORS 150 |
Functions | |
static fs::path | GetPidFile () |
static NODISCARD bool | CreatePidFile () |
void | Interrupt () |
void | Shutdown (InitInterfaces &interfaces) |
static void | HandleSIGTERM (int) |
static void | HandleSIGHUP (int) |
static void | registerSignalHandler (int signal, void(*handler)(int)) |
static void | OnRPCStarted () |
static void | OnRPCStopped () |
void | SetupServerArgs () |
std::string | LicenseInfo () |
static void | BlockNotifyGenesisWait (bool, const CBlockIndex *pBlockIndex) |
static void | CleanupBlockRevFiles () |
static void | ThreadImport (std::vector< fs::path > vImportFiles) |
static bool | InitSanityCheck () |
static bool | AppInitServers () |
void | InitParameterInteraction () |
Parameter interaction: change current parameters depending on various rules. More... | |
static std::string | ResolveErrMsg (const char *const optname, const std::string &strBind) |
void | InitLogging () |
Initialize the logging infrastructure. More... | |
static void | new_handler_terminate () |
bool | AppInitBasicSetup () |
bool | AppInitParameterInteraction () |
static bool | LockDataDirectory (bool probeOnly) |
bool | AppInitSanityChecks () |
bool | AppInitLockDataDirectory () |
bool | AppInitMain (InitInterfaces &interfaces) |
#define MIN_CORE_FILEDESCRIPTORS 150 |
bool AppInitBasicSetup | ( | ) |
Initialize bitcoin core: Basic context setup.
bool AppInitLockDataDirectory | ( | ) |
Lock bitcoin core data directory.
bool AppInitMain | ( | InitInterfaces & | interfaces | ) |
Bitcoin core main initialization.
bool AppInitParameterInteraction | ( | ) |
Initialization: parameter interaction.
bool AppInitSanityChecks | ( | ) |
Initialization sanity checks: ecc init, sanity checks, dir lock.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Signal handlers are very limited in what they are allowed to do. The execution context the handler is invoked in is not guaranteed, so we restrict handler operations to just touching variables:
void InitLogging | ( | ) |
Initialize the logging infrastructure.
Initialize global loggers.
Note that this is called very early in the process lifetime, so you should be careful about what global state you rely on here.
void InitParameterInteraction | ( | ) |
Parameter interaction: change current parameters depending on various rules.
|
static |
Sanity checks Ensure that Bitcoin is running in a usable environment with all necessary library support.
void Interrupt | ( | ) |
Interrupt threads
std::string LicenseInfo | ( | ) |
Returns licensing information (for -version)
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void SetupServerArgs | ( | ) |
Setup the arguments for gArgs
void Shutdown | ( | InitInterfaces & | interfaces | ) |
Note: Shutdown() must be able to handle cases in which initialization failed part of the way, for example if the data directory was found to be locked. Be sure that anything that writes files or flushes caches only does this if the respective module was initialized.
|
static |
|
static |
The PID file facilities.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
std::unique_ptr<BanMan> g_banman |
std::unique_ptr<CConnman> g_connman |
|
static |
|
static |
|
static |
|
static |
std::unique_ptr<PeerLogicValidation> peerLogic |
|
static |
|
static |
|
static |