BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Classes | Macros | Functions | Variables
init.cpp File Reference
#include <init.h>
#include <addrman.h>
#include <amount.h>
#include <chain.h>
#include <chainparams.h>
#include <checkpoints.h>
#include <compat/sanity.h>
#include <consensus/validation.h>
#include <fs.h>
#include <httpserver.h>
#include <httprpc.h>
#include <index/txindex.h>
#include <key.h>
#include <validation.h>
#include <miner.h>
#include <netbase.h>
#include <net.h>
#include <net_processing.h>
#include <policy/feerate.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <rpc/server.h>
#include <rpc/register.h>
#include <rpc/blockchain.h>
#include <script/standard.h>
#include <script/sigcache.h>
#include <scheduler.h>
#include <shutdown.h>
#include <timedata.h>
#include <txdb.h>
#include <txmempool.h>
#include <torcontrol.h>
#include <ui_interface.h>
#include <util.h>
#include <utilmoneystr.h>
#include <validationinterface.h>
#include <warnings.h>
#include <walletinitinterface.h>
#include <stdint.h>
#include <stdio.h>
#include <signal.h>
#include <sys/stat.h>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/bind.hpp>
#include <boost/thread.hpp>
#include <openssl/crypto.h>
Include dependency graph for init.cpp:

Go to the source code of this file.

Classes

class  CCoinsViewErrorCatcher
 This is a minimally invasive approach to shutdown on LevelDB read errors from the chainstate, while keeping user interface out of the common library, which is shared between bsha3d, and bsha3-qt and non-server tools. More...
 
struct  CImportingNow
 

Macros

#define MIN_CORE_FILEDESCRIPTORS   150
 

Functions

void Interrupt ()
 Interrupt threads. More...
 
void Shutdown ()
 
void SetupServerArgs ()
 Setup the arguments for gArgs. More...
 
std::string LicenseInfo ()
 Returns licensing information (for -version) More...
 
void InitParameterInteraction ()
 Parameter interaction: change current parameters depending on various rules. More...
 
void InitLogging ()
 Initialize global loggers. More...
 
bool AppInitBasicSetup ()
 Initialize bitcoin core: Basic context setup. More...
 
bool AppInitParameterInteraction ()
 Initialization: parameter interaction. More...
 
bool AppInitSanityChecks ()
 Initialization sanity checks: ecc init, sanity checks, dir lock. More...
 
bool AppInitLockDataDirectory ()
 Lock bitcoin core data directory. More...
 
bool AppInitMain ()
 Bitcoin core main initialization. More...
 

Variables

bool fFeeEstimatesInitialized = false
 
std::unique_ptr< CConnmang_connman
 
std::unique_ptr< PeerLogicValidationpeerLogic
 

Macro Definition Documentation

◆ MIN_CORE_FILEDESCRIPTORS

#define MIN_CORE_FILEDESCRIPTORS   150

Definition at line 83 of file init.cpp.

Function Documentation

◆ AppInitBasicSetup()

bool AppInitBasicSetup ( )

Initialize bitcoin core: Basic context setup.

Note
This can be done before daemonization. Do not call Shutdown() if this function fails.
Precondition
Parameters should be parsed and config file should be read.

Definition at line 852 of file init.cpp.

Here is the call graph for this function:

◆ AppInitLockDataDirectory()

bool AppInitLockDataDirectory ( )

Lock bitcoin core data directory.

Note
This should only be done after daemonization. Do not call Shutdown() if this function fails.
Precondition
Parameters should be parsed and config file should be read, AppInitSanityChecks should have been called.

Definition at line 1140 of file init.cpp.

◆ AppInitMain()

bool AppInitMain ( )

Bitcoin core main initialization.

Note
This should only be done after daemonization. Call Shutdown() if this function fails.
Precondition
Parameters should be parsed and config file should be read, AppInitLockDataDirectory should have been called.

Definition at line 1152 of file init.cpp.

Here is the call graph for this function:

◆ AppInitParameterInteraction()

bool AppInitParameterInteraction ( )

Initialization: parameter interaction.

Note
This can be done before daemonization. Do not call Shutdown() if this function fails.
Precondition
Parameters should be parsed and config file should be read, AppInitBasicSetup should have been called.

Definition at line 902 of file init.cpp.

Here is the call graph for this function:

◆ AppInitSanityChecks()

bool AppInitSanityChecks ( )

Initialization sanity checks: ecc init, sanity checks, dir lock.

Note
This can be done before daemonization. Do not call Shutdown() if this function fails.
Precondition
Parameters should be parsed and config file should be read, AppInitParameterInteraction should have been called.

Definition at line 1119 of file init.cpp.

Here is the call graph for this function:

◆ InitLogging()

void InitLogging ( )

Initialize global loggers.

Initialize the logging infrastructure.

Note that this is called very early in the process lifetime, so you should be careful about what global state you rely on here.

Definition at line 805 of file init.cpp.

Here is the call graph for this function:

◆ InitParameterInteraction()

void InitParameterInteraction ( )

Parameter interaction: change current parameters depending on various rules.

Definition at line 726 of file init.cpp.

Here is the call graph for this function:

◆ Interrupt()

void Interrupt ( )

Interrupt threads.

Definition at line 144 of file init.cpp.

Here is the call graph for this function:

◆ LicenseInfo()

std::string LicenseInfo ( )

Returns licensing information (for -version)

Definition at line 509 of file init.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupServerArgs()

void SetupServerArgs ( )

Setup the arguments for gArgs.

Definition at line 315 of file init.cpp.

Here is the call graph for this function:

◆ Shutdown()

void Shutdown ( )

Note: Shutdown() must be able to handle cases in which initialization failed part of the way, for example if the data directory was found to be locked. Be sure that anything that writes files or flushes caches only does this if the respective module was initialized.

Definition at line 159 of file init.cpp.

Variable Documentation

◆ fFeeEstimatesInitialized

bool fFeeEstimatesInitialized = false

Definition at line 69 of file init.cpp.

◆ g_connman

std::unique_ptr<CConnman> g_connman

Definition at line 74 of file init.cpp.

◆ peerLogic

std::unique_ptr<PeerLogicValidation> peerLogic

Definition at line 75 of file init.cpp.