Fabcoin Core  0.16.2
P2P Digital Currency
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 <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 <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 <stdint.h>
#include <stdio.h>
#include <memory>
#include <signal.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/interprocess/sync/file_lock.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 fabcoind, and fabcoin-qt and non-server tools. More...
 
struct  CImportingNow
 

Macros

#define MIN_CORE_FILEDESCRIPTORS   150
 

Functions

std::atomic< bool > fRequestShutdown (false)
 
std::atomic< bool > fDumpMempoolLater (false)
 
void StartShutdown ()
 
bool ShutdownRequested ()
 
void Interrupt (boost::thread_group &threadGroup)
 Interrupt threads. More...
 
void Shutdown ()
 
void OnRPCStarted ()
 
void OnRPCStopped ()
 
void OnRPCPreCommand (const CRPCCommand &cmd)
 
std::string HelpMessage (HelpMessageMode mode)
 Help for options shared between UI and daemon (for -help) More...
 
std::string LicenseInfo ()
 Returns licensing information (for -version) More...
 
void CleanupBlockRevFiles ()
 
void ThreadImport (std::vector< fs::path > vImportFiles)
 
bool InitSanityCheck (void)
 Sanity checks Ensure that Fabcoin is running in a usable environment with all necessary library support. More...
 
bool AppInitServers (boost::thread_group &threadGroup)
 
void InitParameterInteraction ()
 Parameter interaction: change current parameters depending on various rules. More...
 
void InitLogging ()
 Initialize the logging infrastructure. More...
 
bool AppInitBasicSetup ()
 Initialize fabcoin 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 fabcoin core data directory. More...
 
bool AppInitMain (boost::thread_group &threadGroup, CScheduler &scheduler)
 Fabcoin core main initialization. More...
 
void UnlockDataDirectory ()
 Unlock the data directory. More...
 

Variables

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

Macro Definition Documentation

#define MIN_CORE_FILEDESCRIPTORS   150

Definition at line 88 of file init.cpp.

Function Documentation

bool AppInitBasicSetup ( )

Initialize fabcoin 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 885 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool AppInitLockDataDirectory ( )

Lock fabcoin 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 1241 of file init.cpp.

Here is the caller graph for this function:

bool AppInitMain ( boost::thread_group &  threadGroup,
CScheduler scheduler 
)

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

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool AppInitServers ( boost::thread_group &  threadGroup)

Definition at line 755 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CleanupBlockRevFiles ( )

Definition at line 626 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::atomic<bool> fDumpMempoolLater ( false  )

Here is the caller graph for this function:

std::atomic<bool> fRequestShutdown ( false  )

Here is the caller graph for this function:

std::string HelpMessage ( HelpMessageMode  mode)

Help for options shared between UI and daemon (for -help)

Definition at line 338 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void InitLogging ( )

Initialize the logging infrastructure.

Definition at line 851 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void InitParameterInteraction ( )

Parameter interaction: change current parameters depending on various rules.

Definition at line 774 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool InitSanityCheck ( void  )

Sanity checks Ensure that Fabcoin is running in a usable environment with all necessary library support.

Definition at line 737 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Interrupt ( boost::thread_group &  threadGroup)

Interrupt threads.

Definition at line 159 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string LicenseInfo ( )

Returns licensing information (for -version)

Definition at line 558 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void OnRPCPreCommand ( const CRPCCommand cmd)

Definition at line 329 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void OnRPCStarted ( )

Definition at line 316 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void OnRPCStopped ( )

Definition at line 321 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool ShutdownRequested ( )

Definition at line 126 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void StartShutdown ( )

Definition at line 122 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ThreadImport ( std::vector< fs::path >  vImportFiles)

Definition at line 661 of file init.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void UnlockDataDirectory ( )

Unlock the data directory.

Definition at line 1840 of file init.cpp.

Here is the caller graph for this function:

Variable Documentation

bool fFeeEstimatesInitialized = false

Definition at line 69 of file init.cpp.

std::unique_ptr<CConnman> g_connman

Definition at line 75 of file init.cpp.

std::unique_ptr<PeerLogicValidation> peerLogic

Definition at line 76 of file init.cpp.