![]() |
Bitcoin Core
21.99.0
P2P Digital Currency
|
#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 <hash.h>
#include <httprpc.h>
#include <httpserver.h>
#include <index/blockfilterindex.h>
#include <index/txindex.h>
#include <interfaces/chain.h>
#include <interfaces/node.h>
#include <key.h>
#include <mapport.h>
#include <miner.h>
#include <net.h>
#include <net_permissions.h>
#include <net_processing.h>
#include <netbase.h>
#include <node/context.h>
#include <node/ui_interface.h>
#include <policy/feerate.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <policy/settings.h>
#include <protocol.h>
#include <rpc/blockchain.h>
#include <rpc/register.h>
#include <rpc/server.h>
#include <rpc/util.h>
#include <scheduler.h>
#include <script/sigcache.h>
#include <script/standard.h>
#include <shutdown.h>
#include <sync.h>
#include <timedata.h>
#include <torcontrol.h>
#include <txdb.h>
#include <txmempool.h>
#include <util/asmap.h>
#include <util/check.h>
#include <util/moneystr.h>
#include <util/string.h>
#include <util/system.h>
#include <util/threadnames.h>
#include <util/translation.h>
#include <validation.h>
#include <validationinterface.h>
#include <walletinitinterface.h>
#include <functional>
#include <set>
#include <stdint.h>
#include <stdio.h>
#include <attributes.h>
#include <cerrno>
#include <signal.h>
#include <sys/stat.h>
#include <boost/algorithm/string/replace.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/thread/thread.hpp>
Go to the source code of this file.
Classes | |
struct | CImportingNow |
Macros | |
#define | MIN_CORE_FILEDESCRIPTORS 150 |
Functions | |
static fs::path | GetPidFile (const ArgsManager &args) |
static bool | CreatePidFile (const ArgsManager &args) |
void | Interrupt (NodeContext &node) |
Interrupt threads. More... | |
void | Shutdown (NodeContext &node) |
static void | HandleSIGTERM (int) |
Signal handlers are very limited in what they are allowed to do. More... | |
static void | HandleSIGHUP (int) |
static void | registerSignalHandler (int signal, void(*handler)(int)) |
static void | OnRPCStarted () |
static void | OnRPCStopped () |
void | SetupServerArgs (NodeContext &node) |
Register all arguments with the ArgsManager. More... | |
std::string | LicenseInfo () |
Returns licensing information (for -version) More... | |
static void | BlockNotifyGenesisWait (const CBlockIndex *pBlockIndex) |
static void | CleanupBlockRevFiles () |
static void | StartupNotify (const ArgsManager &args) |
static void | ThreadImport (ChainstateManager &chainman, std::vector< fs::path > vImportFiles, const ArgsManager &args) |
static bool | InitSanityCheck () |
Sanity checks Ensure that Bitcoin is running in a usable environment with all necessary library support. More... | |
static bool | AppInitServers (const util::Ref &context, NodeContext &node) |
void | InitParameterInteraction (ArgsManager &args) |
Parameter interaction: change current parameters depending on various rules. More... | |
void | InitLogging (const ArgsManager &args) |
Initialize global loggers. More... | |
static void | new_handler_terminate () |
bool | AppInitBasicSetup (const ArgsManager &args) |
Initialize bitcoin core: Basic context setup. More... | |
bool | AppInitParameterInteraction (const ArgsManager &args) |
Initialization: parameter interaction. More... | |
static bool | LockDataDirectory (bool probeOnly) |
bool | AppInitSanityChecks () |
Initialization sanity checks: ecc init, sanity checks, dir lock. More... | |
bool | AppInitLockDataDirectory () |
Lock bitcoin core data directory. More... | |
bool | AppInitInterfaces (NodeContext &node) |
Initialize node and wallet interface pointers. More... | |
bool | AppInitMain (const util::Ref &context, NodeContext &node, interfaces::BlockAndHeaderTipInfo *tip_info) |
Bitcoin core main initialization. More... | |
Variables | |
static const bool | DEFAULT_PROXYRANDOMIZE = true |
static const bool | DEFAULT_REST_ENABLE = false |
static const bool | DEFAULT_STOPAFTERBLOCKIMPORT = false |
static const char * | DEFAULT_ASMAP_FILENAME ="ip_asn.map" |
static const char * | BITCOIN_PID_FILENAME = "bitcoind.pid" |
The PID file facilities. More... | |
static std::unique_ptr< ECCVerifyHandle > | globalVerifyHandle |
static std::thread | g_load_block |
static boost::thread_group | threadGroup |
static boost::signals2::connection | rpc_notify_block_change_connection |
static bool | fHaveGenesis = false |
static Mutex | g_genesis_wait_mutex |
static std::condition_variable | g_genesis_wait_cv |
bool AppInitBasicSetup | ( | const ArgsManager & | args | ) |
Initialize bitcoin core: Basic context setup.
Definition at line 917 of file init.cpp.
bool AppInitInterfaces | ( | NodeContext & | node | ) |
bool AppInitLockDataDirectory | ( | ) |
Lock bitcoin core data directory.
Definition at line 1243 of file init.cpp.
bool AppInitMain | ( | const util::Ref & | context, |
NodeContext & | node, | ||
interfaces::BlockAndHeaderTipInfo * | tip_info = nullptr |
||
) |
Bitcoin core main initialization.
Definition at line 1266 of file init.cpp.
bool AppInitParameterInteraction | ( | const ArgsManager & | args | ) |
Initialization: parameter interaction.
Definition at line 962 of file init.cpp.
bool AppInitSanityChecks | ( | ) |
Initialization sanity checks: ecc init, sanity checks, dir lock.
Definition at line 1222 of file init.cpp.
|
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:
Definition at line 318 of file init.cpp.
void InitLogging | ( | const ArgsManager & | args | ) |
Initialize global loggers.
Initialize the logging infrastructure.
Note that this is called very early in the process lifetime, so you should be careful about what global state you rely on here.
Definition at line 871 of file init.cpp.
void InitParameterInteraction | ( | ArgsManager & | args | ) |
|
static |
void Interrupt | ( | NodeContext & | node | ) |
std::string LicenseInfo | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
void SetupServerArgs | ( | NodeContext & | node | ) |
Register all arguments with the ArgsManager.
Definition at line 361 of file init.cpp.
void Shutdown | ( | NodeContext & | node | ) |
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.
Definition at line 176 of file init.cpp.
|
static |
|
static |
|
static |
|
static |
|
static |