Bitcoin Core  0.19.99
P2P Digital Currency
Functions
init.h File Reference
#include <memory>
#include <string>
#include <util/system.h>
Include dependency graph for init.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void Interrupt (NodeContext &node)
 Interrupt threads. More...
 
void Shutdown (NodeContext &node)
 
void InitLogging ()
 Initialize the logging infrastructure. More...
 
void InitParameterInteraction ()
 Parameter interaction: change current parameters depending on various rules. 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 (NodeContext &node)
 Bitcoin core main initialization. More...
 
void SetupServerArgs ()
 Setup the arguments for gArgs. More...
 
std::string LicenseInfo ()
 Returns licensing information (for -version) More...
 

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 876 of file init.cpp.

Here is the call graph for this function:
Here is the caller 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 1180 of file init.cpp.

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

◆ AppInitMain()

bool AppInitMain ( NodeContext node)

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 1192 of file init.cpp.

Here is the caller 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 917 of file init.cpp.

Here is the call graph for this function:
Here is the caller 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 1159 of file init.cpp.

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

◆ InitLogging()

void InitLogging ( )

Initialize the logging infrastructure.

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 832 of file init.cpp.

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

◆ InitParameterInteraction()

void InitParameterInteraction ( )

Parameter interaction: change current parameters depending on various rules.

Definition at line 763 of file init.cpp.

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

◆ Interrupt()

void Interrupt ( NodeContext node)

Interrupt threads.

Definition at line 157 of file init.cpp.

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

◆ LicenseInfo()

std::string LicenseInfo ( )

Returns licensing information (for -version)

Definition at line 561 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 347 of file init.cpp.

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

◆ Shutdown()

void Shutdown ( NodeContext node)

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 173 of file init.cpp.

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