Bitcoin Core 28.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
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, bool can_listen_ipc=false);
78
81
82#endif // BITCOIN_INIT_H
int exit_status
ArgsManager & args
Definition: bitcoind.cpp:277
void Shutdown(node::NodeContext &node)
Definition: init.cpp:281
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:801
bool AppInitLockDataDirectory()
Lock bitcoin core data directory.
Definition: init.cpp:1108
void InitContext(node::NodeContext &node)
Initialize node context shutdown and args variables.
Definition: init.cpp:206
bool AppInitMain(node::NodeContext &node, interfaces::BlockAndHeaderTipInfo *tip_info=nullptr)
Bitcoin core main initialization.
Definition: init.cpp:1272
bool AppInitBasicSetup(const ArgsManager &args, std::atomic< int > &exit_status)
Initialize bitcoin core: Basic context setup.
Definition: init.cpp:830
void Interrupt(node::NodeContext &node)
Interrupt threads.
Definition: init.cpp:263
bool ShutdownRequested(node::NodeContext &node)
Return whether node shutdown was requested.
Definition: init.cpp:245
void SetupServerArgs(ArgsManager &argsman, bool can_listen_ipc=false)
Register all arguments with the ArgsManager.
Definition: init.cpp:443
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:2023
bool AppInitParameterInteraction(const ArgsManager &args)
Initialization: parameter interaction.
Definition: init.cpp:867
void InitParameterInteraction(ArgsManager &args)
Parameter interaction: change current parameters depending on various rules.
Definition: init.cpp:713
bool AppInitInterfaces(node::NodeContext &node)
Initialize node and wallet interface pointers.
Definition: init.cpp:1120
bool AppInitSanityChecks(const kernel::Context &kernel)
Initialization sanity checks.
Definition: init.cpp:1089
Definition: messages.h:20
Block and header tip information.
Definition: node.h:51
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:56