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 <any>
10 #include <memory>
11 #include <string>
12 
14 static constexpr bool DEFAULT_DAEMON = false;
16 static constexpr bool DEFAULT_DAEMONWAIT = false;
17 
18 class ArgsManager;
19 namespace interfaces {
20 struct BlockAndHeaderTipInfo;
21 }
22 namespace kernel {
23 struct Context;
24 }
25 namespace node {
26 struct NodeContext;
27 } // namespace node
28 
33 
38 void InitLogging(const ArgsManager& args);
41 
46 bool AppInitBasicSetup(const ArgsManager& args, std::atomic<int>& exit_status);
75 
79 void SetupServerArgs(ArgsManager& argsman);
80 
83 
84 #endif // BITCOIN_INIT_H
int exit_status
ArgsManager & args
Definition: bitcoind.cpp:267
void Shutdown(node::NodeContext &node)
Definition: init.cpp:270
static constexpr bool DEFAULT_DAEMON
Default value for -daemon option.
Definition: init.h:14
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:202
void SetupServerArgs(ArgsManager &argsman)
Register all arguments with the ArgsManager.
Definition: init.cpp:445
bool AppInitMain(node::NodeContext &node, interfaces::BlockAndHeaderTipInfo *tip_info=nullptr)
Bitcoin core main initialization.
Definition: init.cpp:1123
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:252
bool ShutdownRequested(node::NodeContext &node)
Return whether node shutdown was requested.
Definition: init.cpp:234
static constexpr bool DEFAULT_DAEMONWAIT
Default value for -daemonwait option.
Definition: init.h:16
bool StartIndexBackgroundSync(node::NodeContext &node)
Validates requirements to run the indexes and spawns each index initial sync thread.
Definition: init.cpp:1995
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:53