Bitcoin ABC  0.28.12
P2P Digital Currency
init.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2018 The Bitcoin Core developers
3 // Copyright (c) 2018-2019 The Bitcoin developers
4 // Distributed under the MIT software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #ifndef BITCOIN_INIT_H
8 #define BITCOIN_INIT_H
9 
10 #include <util/system.h>
11 
12 #include <memory>
13 #include <string>
14 
16 static constexpr bool DEFAULT_DAEMON = false;
18 static constexpr bool DEFAULT_DAEMONWAIT = false;
19 
20 class ArgsManager;
21 class Config;
22 class CScheduler;
23 class CWallet;
25 namespace interfaces {
26 struct BlockAndHeaderTipInfo;
27 }
28 namespace node {
29 struct NodeContext;
30 } // namespace node
31 class RPCServer;
32 
37 void InitLogging(const ArgsManager &args);
40 
47 bool AppInitBasicSetup(const ArgsManager &args);
55 bool AppInitParameterInteraction(Config &config, const ArgsManager &args);
63 bool AppInitSanityChecks();
83 bool AppInitMain(Config &config, RPCServer &rpcServer,
84  HTTPRPCRequestProcessor &httpRPCRequestProcessor,
86  interfaces::BlockAndHeaderTipInfo *tip_info = nullptr);
87 
92 
94 std::string LicenseInfo();
95 
96 #endif // BITCOIN_INIT_H
Simple class for background tasks that should be run periodically or once "after a while".
Definition: scheduler.h:41
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:253
Definition: config.h:17
Class for registering and managing all RPC calls.
Definition: server.h:39
void Shutdown(node::NodeContext &node)
Definition: init.cpp:216
static constexpr bool DEFAULT_DAEMON
Default value for -daemon option.
Definition: init.h:16
void SetupServerArgs(node::NodeContext &node)
Register all arguments with the ArgsManager.
Definition: init.cpp:412
void InitLogging(const ArgsManager &args)
Initialize the logging infrastructure.
Definition: init.cpp:1639
bool AppInitLockDataDirectory()
Lock bitcoin data directory.
Definition: init.cpp:2067
void Interrupt(node::NodeContext &node)
Interrupt threads.
Definition: init.cpp:192
bool AppInitBasicSetup(const ArgsManager &args)
Initialize bitcoin: Basic context setup.
Definition: init.cpp:1666
bool AppInitSanityChecks()
Initialization sanity checks: ecc init, sanity checks, dir lock.
Definition: init.cpp:2049
static constexpr bool DEFAULT_DAEMONWAIT
Default value for -daemonwait option.
Definition: init.h:18
void InitParameterInteraction(ArgsManager &args)
Parameter interaction: change current parameters depending on various rules.
Definition: init.cpp:1505
bool AppInitMain(Config &config, RPCServer &rpcServer, HTTPRPCRequestProcessor &httpRPCRequestProcessor, node::NodeContext &node, interfaces::BlockAndHeaderTipInfo *tip_info=nullptr)
Bitcoin main initialization.
Definition: init.cpp:2089
std::string LicenseInfo()
Returns licensing information (for -version)
Definition: init.cpp:1424
bool AppInitParameterInteraction(Config &config, const ArgsManager &args)
Initialization: parameter interaction.
Definition: init.cpp:1713
bool AppInitInterfaces(node::NodeContext &node)
Initialize node and wallet interface pointers.
Definition: init.cpp:2079
Definition: init.h:28
Block and header tip information.
Definition: node.h:49
NodeContext struct containing references to chain state and connection state.
Definition: context.h:38