#include <init.h>
#include <kernel/checks.h>
#include <kernel/mempool_persist.h>
#include <kernel/validation_cache_sizes.h>
#include <addrman.h>
#include <banman.h>
#include <blockfilter.h>
#include <chain.h>
#include <chainparams.h>
#include <chainparamsbase.h>
#include <common/args.h>
#include <common/system.h>
#include <consensus/amount.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 <init/common.h>
#include <interfaces/chain.h>
#include <interfaces/init.h>
#include <interfaces/node.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_args.h>
#include <node/miner.h>
#include <node/txreconciliation.h>
#include <node/validation_cache_args.h>
#include <policy/feerate.h>
#include <policy/fees.h>
#include <policy/fees_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 <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/chaintype.h>
#include <util/check.h>
#include <util/fs.h>
#include <util/fs_helpers.h>
#include <util/moneystr.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/syscall_sandbox.h>
#include <util/syserror.h>
#include <util/thread.h>
#include <util/threadnames.h>
#include <util/translation.h>
#include <validation.h>
#include <validationinterface.h>
#include <walletinitinterface.h>
#include <algorithm>
#include <condition_variable>
#include <cstdint>
#include <cstdio>
#include <fstream>
#include <functional>
#include <set>
#include <string>
#include <thread>
#include <vector>
#include <cerrno>
#include <signal.h>
#include <sys/stat.h>
#include <boost/signals2/signal.hpp>
Go to the source code of this file.
◆ MIN_CORE_FILEDESCRIPTORS
#define MIN_CORE_FILEDESCRIPTORS 150 |
◆ AppInitBasicSetup()
Initialize bitcoin core: Basic context setup.
- Note
- This can be done before daemonization. Do not call Shutdown() if this function fails.
- Precondition
- Parameters should be parsed and config file should be read.
Definition at line 803 of file init.cpp.
◆ AppInitInterfaces()
Initialize node and wallet interface pointers.
Has no prerequisites or side effects besides allocating memory.
Definition at line 1088 of file init.cpp.
◆ AppInitLockDataDirectory()
bool AppInitLockDataDirectory |
( |
| ) |
|
Lock bitcoin core data directory.
- Note
- This should only be done after daemonization. Do not call Shutdown() if this function fails.
- Precondition
- Parameters should be parsed and config file should be read, AppInitSanityChecks should have been called.
Definition at line 1076 of file init.cpp.
◆ AppInitMain()
Bitcoin core main initialization.
- Note
- This should only be done after daemonization. Call Shutdown() if this function fails.
- Precondition
- Parameters should be parsed and config file should be read, AppInitLockDataDirectory should have been called.
Definition at line 1094 of file init.cpp.
◆ AppInitParameterInteraction()
bool AppInitParameterInteraction |
( |
const ArgsManager & |
args, |
|
|
bool |
use_syscall_sandbox = true |
|
) |
| |
Initialization: parameter interaction.
- Note
- This can be done before daemonization. Do not call Shutdown() if this function fails.
- Precondition
- Parameters should be parsed and config file should be read, AppInitBasicSetup should have been called.
Definition at line 844 of file init.cpp.
◆ AppInitSanityChecks()
Initialization sanity checks.
- Note
- This can be done before daemonization. Do not call Shutdown() if this function fails.
- Precondition
- Parameters should be parsed and config file should be read, AppInitParameterInteraction should have been called.
Definition at line 1061 of file init.cpp.
◆ AppInitServers()
◆ BlockNotifyGenesisWait()
static void BlockNotifyGenesisWait |
( |
const CBlockIndex * |
pBlockIndex | ) |
|
|
static |
◆ CreatePidFile()
◆ GetPidFile()
◆ HandleSIGHUP()
static void HandleSIGHUP |
( |
int |
| ) |
|
|
static |
◆ HandleSIGTERM()
static void HandleSIGTERM |
( |
int |
| ) |
|
|
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 366 of file init.cpp.
◆ InitLogging()
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 773 of file init.cpp.
◆ InitParameterInteraction()
Parameter interaction: change current parameters depending on various rules.
Definition at line 681 of file init.cpp.
◆ Interrupt()
Interrupt threads.
Definition at line 214 of file init.cpp.
◆ LockDataDirectory()
static bool LockDataDirectory |
( |
bool |
probeOnly | ) |
|
|
static |
◆ new_handler_terminate()
static void new_handler_terminate |
( |
| ) |
|
|
static |
◆ OnRPCStarted()
static void OnRPCStarted |
( |
| ) |
|
|
static |
◆ OnRPCStopped()
static void OnRPCStopped |
( |
| ) |
|
|
static |
◆ registerSignalHandler()
static void registerSignalHandler |
( |
int |
signal, |
|
|
void(*)(int) |
handler |
|
) |
| |
|
static |
◆ SetupServerArgs()
◆ Shutdown()
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 236 of file init.cpp.
◆ BITCOIN_PID_FILENAME
const char* BITCOIN_PID_FILENAME = "bitcoind.pid" |
|
static |
The PID file facilities.
Definition at line 154 of file init.cpp.
◆ DEFAULT_ASMAP_FILENAME
const char* DEFAULT_ASMAP_FILENAME ="ip_asn.map" |
|
static |
◆ DEFAULT_I2P_ACCEPT_INCOMING
constexpr bool DEFAULT_I2P_ACCEPT_INCOMING {true} |
|
staticconstexpr |
◆ DEFAULT_PROXYRANDOMIZE
constexpr bool DEFAULT_PROXYRANDOMIZE {true} |
|
staticconstexpr |
◆ DEFAULT_REST_ENABLE
constexpr bool DEFAULT_REST_ENABLE {false} |
|
staticconstexpr |
◆ fHaveGenesis
bool fHaveGenesis = false |
|
static |
◆ g_genesis_wait_cv
std::condition_variable g_genesis_wait_cv |
|
static |
◆ g_genesis_wait_mutex
◆ rpc_notify_block_change_connection
boost::signals2::connection rpc_notify_block_change_connection |
|
static |