Bitcoin Core 28.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
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
12static constexpr bool DEFAULT_DAEMON = false;
14static constexpr bool DEFAULT_DAEMONWAIT = false;
15
16class ArgsManager;
17namespace interfaces {
18struct BlockAndHeaderTipInfo;
19}
20namespace kernel {
21struct Context;
22}
23namespace node {
24struct NodeContext;
25} // namespace node
26
31
36void InitLogging(const ArgsManager& args);
39
44bool AppInitBasicSetup(const ArgsManager& args, std::atomic<int>& exit_status);
73
77void 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:828
bool AppInitLockDataDirectory()
Lock bitcoin core data directory.
Definition init.cpp:1119
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:1138
bool AppInitBasicSetup(const ArgsManager &args, std::atomic< int > &exit_status)
Initialize bitcoin core: Basic context setup.
Definition init.cpp:858
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:2020
bool AppInitParameterInteraction(const ArgsManager &args)
Initialization: parameter interaction.
Definition init.cpp:895
void InitParameterInteraction(ArgsManager &args)
Parameter interaction: change current parameters depending on various rules.
Definition init.cpp:736
bool AppInitInterfaces(node::NodeContext &node)
Initialize node and wallet interface pointers.
Definition init.cpp:1131
bool AppInitSanityChecks(const kernel::Context &kernel)
Initialization sanity checks.
Definition init.cpp:1100
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