![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
#include <bitcoin-build-config.h>#include <init.h>#include <kernel/checks.h>#include <addrman.h>#include <banman.h>#include <blockfilter.h>#include <chain.h>#include <chainparams.h>#include <chainparamsbase.h>#include <clientversion.h>#include <common/args.h>#include <common/system.h>#include <consensus/amount.h>#include <consensus/consensus.h>#include <deploymentstatus.h>#include <hash.h>#include <httprpc.h>#include <httpserver.h>#include <index/blockfilterindex.h>#include <index/coinstatsindex.h>#include <index/txindex.h>#include <index/txospenderindex.h>#include <init/common.h>#include <interfaces/chain.h>#include <interfaces/init.h>#include <interfaces/ipc.h>#include <interfaces/mining.h>#include <interfaces/node.h>#include <ipc/exception.h>#include <kernel/caches.h>#include <kernel/context.h>#include <key.h>#include <logging.h>#include <mapport.h>#include <net.h>#include <net_permissions.h>#include <net_processing.h>#include <netbase.h>#include <netgroup.h>#include <node/blockmanager_args.h>#include <node/blockstorage.h>#include <node/caches.h>#include <node/chainstate.h>#include <node/chainstatemanager_args.h>#include <node/context.h>#include <node/interface_ui.h>#include <node/kernel_notifications.h>#include <node/mempool_args.h>#include <node/mempool_persist.h>#include <node/mempool_persist_args.h>#include <node/miner.h>#include <node/peerman_args.h>#include <policy/feerate.h>#include <policy/fees/block_policy_estimator.h>#include <policy/fees/block_policy_estimator_args.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 <sync.h>#include <torcontrol.h>#include <txdb.h>#include <txmempool.h>#include <util/asmap.h>#include <util/batchpriority.h>#include <util/chaintype.h>#include <util/check.h>#include <util/fs.h>#include <util/fs_helpers.h>#include <util/moneystr.h>#include <util/result.h>#include <util/signalinterrupt.h>#include <util/strencodings.h>#include <util/string.h>#include <util/syserror.h>#include <util/thread.h>#include <util/threadnames.h>#include <util/time.h>#include <util/translation.h>#include <validation.h>#include <validationinterface.h>#include <walletinitinterface.h>#include <algorithm>#include <cerrno>#include <condition_variable>#include <cstddef>#include <cstdint>#include <cstdio>#include <fstream>#include <functional>#include <set>#include <string>#include <thread>#include <vector>#include <csignal>#include <sys/stat.h>#include <boost/signals2/signal.hpp>Go to the source code of this file.
Macros | |
| #define | MIN_LEVELDB_FDS 150 |
Variables | |
| static constexpr bool | DEFAULT_PROXYRANDOMIZE {true} |
| static constexpr bool | DEFAULT_REST_ENABLE {false} |
| static constexpr bool | DEFAULT_I2P_ACCEPT_INCOMING {true} |
| static constexpr bool | DEFAULT_STOPAFTERBLOCKIMPORT {false} |
| static constexpr int | MIN_CORE_FDS = MIN_LEVELDB_FDS + NUM_FDS_MESSAGE_CAPTURE |
| static const char * | BITCOIN_PID_FILENAME = "bitcoind.pid" |
| The PID file facilities. | |
| static bool | g_generated_pid {false} |
| True if this process has created a PID file. | |
| static std::optional< util::SignalInterrupt > | g_shutdown |
| bool AppInitBasicSetup | ( | const ArgsManager & | args, |
| std::atomic< int > & | exit_status ) |
Initialize bitcoin core: Basic context setup.
Definition at line 882 of file init.cpp.
| bool AppInitInterfaces | ( | node::NodeContext & | node | ) |
| bool AppInitLockDirectories | ( | ) |
Lock bitcoin core critical directories.
Definition at line 1195 of file init.cpp.
| bool AppInitMain | ( | node::NodeContext & | node, |
| interfaces::BlockAndHeaderTipInfo * | tip_info = nullptr ) |
Bitcoin core main initialization.
Definition at line 1421 of file init.cpp.
| bool AppInitParameterInteraction | ( | const ArgsManager & | args | ) |
Initialization: parameter interaction.
Definition at line 919 of file init.cpp.
| bool AppInitSanityChecks | ( | const kernel::Context & | kernel | ) |
Initialization sanity checks.
Definition at line 1176 of file init.cpp.
|
static |
|
static |
Checks for duplicate bindings across all binding configurations.
| [in] | conn_options | Connection options containing the binding vectors to check |
Definition at line 1271 of file init.cpp.
| bool CheckHostPortOptions | ( | const ArgsManager & | args | ) |
|
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 425 of file init.cpp.
|
static |
| void InitContext | ( | NodeContext & | node | ) |
| 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 853 of file init.cpp.
| void InitParameterInteraction | ( | ArgsManager & | args | ) |
| void Interrupt | ( | NodeContext & | node | ) |
|
static |
| void SetupServerArgs | ( | ArgsManager & | argsman, |
| bool | can_listen_ipc ) |
Register all arguments with the ArgsManager.
Definition at line 459 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 288 of file init.cpp.
| bool ShutdownRequested | ( | node::NodeContext & | node | ) |
| bool StartIndexBackgroundSync | ( | NodeContext & | node | ) |
|
static |
|
static |
|
staticconstexpr |