Bitcoin Core  27.99.0
P2P Digital Currency
init.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2022 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_INIT_H
7 #define BITCOIN_INIT_H
8 
9 #include <atomic>
10 
12 static constexpr bool DEFAULT_DAEMON = false;
14 static constexpr bool DEFAULT_DAEMONWAIT = false;
15 
16 class ArgsManager;
17 namespace interfaces {
18 struct BlockAndHeaderTipInfo;
19 }
20 namespace kernel {
21 struct Context;
22 }
23 namespace node {
24 struct NodeContext;
25 } // namespace node
26 
31 
36 void InitLogging(const ArgsManager& args);
39 
44 bool AppInitBasicSetup(const ArgsManager& args, std::atomic<int>& exit_status);
73 
77 void SetupServerArgs(ArgsManager& argsman);
78 
81 
82 #endif // BITCOIN_INIT_H
int exit_status
ArgsManager & args
Definition: bitcoind.cpp:270
void Shutdown(node::NodeContext &node)
Definition: init.cpp:268
static constexpr bool DEFAULT_DAEMON
Default value for -daemon option.
Definition: init.h:12
void InitLogging(const ArgsManager &args)
Initialize the logging infrastructure.
Definition: init.cpp:819
bool AppInitLockDataDirectory()
Lock bitcoin core data directory.
Definition: init.cpp:1105
void InitContext(node::NodeContext &node)
Initialize node context shutdown and args variables.
Definition: init.cpp:200
void SetupServerArgs(ArgsManager &argsman)
Register all arguments with the ArgsManager.
Definition: init.cpp:444
bool AppInitMain(node::NodeContext &node, interfaces::BlockAndHeaderTipInfo *tip_info=nullptr)
Bitcoin core main initialization.
Definition: init.cpp:1124
bool AppInitBasicSetup(const ArgsManager &args, std::atomic< int > &exit_status)
Initialize bitcoin core: Basic context setup.
Definition: init.cpp:849
void Interrupt(node::NodeContext &node)
Interrupt threads.
Definition: init.cpp:250
bool ShutdownRequested(node::NodeContext &node)
Return whether node shutdown was requested.
Definition: init.cpp:232
static constexpr bool DEFAULT_DAEMONWAIT
Default value for -daemonwait option.
Definition: init.h:14
bool StartIndexBackgroundSync(node::NodeContext &node)
Validates requirements to run the indexes and spawns each index initial sync thread.
Definition: init.cpp:1992
bool AppInitParameterInteraction(const ArgsManager &args)
Initialization: parameter interaction.
Definition: init.cpp:886
void InitParameterInteraction(ArgsManager &args)
Parameter interaction: change current parameters depending on various rules.
Definition: init.cpp:727
bool AppInitInterfaces(node::NodeContext &node)
Initialize node and wallet interface pointers.
Definition: init.cpp:1117
bool AppInitSanityChecks(const kernel::Context &kernel)
Initialization sanity checks.
Definition: init.cpp:1086
Definition: messages.h:20
Block and header tip information.
Definition: node.h:50
Context struct holding the kernel library's logically global state, and passed to external libbitcoin...
Definition: context.h:16
NodeContext struct containing references to chain state and connection state.
Definition: context.h:55