Bitcoin
Classes | Namespaces | Functions
init.h File Reference
#include <memory>
#include <string>
#include <util/system.h>

Go to the source code of this file.

Classes

struct  InitInterfaces
 Pointers to interfaces used during init and destroyed on shutdown. More...
 

Namespaces

 interfaces
 
 boost
 

Functions

void Interrupt ()
 
void Shutdown (InitInterfaces &interfaces)
 
void InitLogging ()
 Initialize the logging infrastructure. More...
 
void InitParameterInteraction ()
 Parameter interaction: change current parameters depending on various rules. More...
 
bool AppInitBasicSetup ()
 
bool AppInitParameterInteraction ()
 
bool AppInitSanityChecks ()
 
bool AppInitLockDataDirectory ()
 
bool AppInitMain (InitInterfaces &interfaces)
 
void SetupServerArgs ()
 
std::string LicenseInfo ()
 

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.

◆ 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.

◆ AppInitMain()

bool AppInitMain ( InitInterfaces interfaces)

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.

◆ 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.

◆ 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.

◆ InitLogging()

void InitLogging ( )

Initialize the logging infrastructure.

Initialize global loggers.

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

◆ InitParameterInteraction()

void InitParameterInteraction ( )

Parameter interaction: change current parameters depending on various rules.

◆ Interrupt()

void Interrupt ( )

Interrupt threads

◆ LicenseInfo()

std::string LicenseInfo ( )

Returns licensing information (for -version)

◆ SetupServerArgs()

void SetupServerArgs ( )

Setup the arguments for gArgs

◆ Shutdown()

void Shutdown ( InitInterfaces interfaces)

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.