Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <util.h>
#include <chainparamsbase.h>
#include <fs.h>
#include <random.h>
#include <serialize.h>
#include <utilstrencodings.h>
#include <utiltime.h>
#include <stdarg.h>
#include <algorithm>
#include <fcntl.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/program_options/detail/config_file.hpp>
#include <boost/thread.hpp>
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/conf.h>
Go to the source code of this file.
Classes | |
class | CInit |
struct | CLogCategoryDesc |
Functions | |
std::atomic< bool > | fReopenDebugLog (false) |
std::atomic< uint32_t > | logCategories (0) |
Log categories bitfield. More... | |
void | locking_callback (int mode, int i, const char *file, int line) NO_THREAD_SAFETY_ANALYSIS |
void | OpenDebugLog () |
bool | GetLogCategory (uint32_t *f, const std::string *str) |
Return true if str parses as a log category and set the flags in f. More... | |
std::string | ListLogCategories () |
Returns a string with the log categories. More... | |
std::vector< CLogCategoryActive > | ListActiveLogCategories () |
Returns a vector of the active log categories. More... | |
bool | LogAcceptCategoryChar (const char *category) |
Return true if log accepts specified category. More... | |
int | LogPrintStr (const std::string &str, bool useVMLog) |
Send a string to the log output. More... | |
std::string | HelpMessageGroup (const std::string &message) |
Format a string to be used as group of options in help messages. More... | |
std::string | HelpMessageOpt (const std::string &option, const std::string &message) |
Format a string to be used as option description in help messages. More... | |
void | PrintExceptionContinue (const std::exception *pex, const char *pszThread) |
fs::path | GetDefaultDataDir () |
const fs::path & | GetDataDir (bool fNetSpecific) |
void | ClearDatadirCache () |
fs::path | GetConfigFile (const std::string &confPath) |
fs::path | GetPidFile () |
void | CreatePidFile (const fs::path &path, pid_t pid) |
bool | RenameOver (fs::path src, fs::path dest) |
bool | TryCreateDirectories (const fs::path &p) |
Ignores exceptions thrown by Boost's create_directories if the requested directory exists. More... | |
void | FileCommit (FILE *file) |
bool | TruncateFile (FILE *file, unsigned int length) |
int | RaiseFileDescriptorLimit (int nMinFD) |
this function tries to raise the file descriptor limit to the requested number. More... | |
void | AllocateFileRange (FILE *file, unsigned int offset, unsigned int length) |
this function tries to make a particular range of a file allocated (corresponding to disk space) it is advisory, and the range specified in the arguments will never contain live data More... | |
void | ShrinkDebugFile () |
void | runCommand (const std::string &strCommand) |
void | RenameThread (const char *name) |
void | SetupEnvironment () |
bool | SetupNetworking () |
void | SetThreadPriority (int nPriority) |
int | GetNumCores () |
Return the number of physical cores available on the current system. More... | |
std::string | CopyrightHolders (const std::string &strPrefix) |
int64_t | GetStartupTime () |
Server/client environment: argument handling, config file parsing, logging, thread wrappers, startup time. More... | |
bool | CheckHex (const std::string &str) |
Variables | |
const int64_t | nStartupTime = GetTime() |
const char *const | FABCOIN_CONF_FILENAME = "fabcoin.conf" |
const char *const | FABCOIN_PID_FILENAME = "fabcoind.pid" |
ArgsManager | gArgs |
bool | fPrintToConsole = false |
bool | fPrintToDebugLog = true |
bool | fLogTimestamps = DEFAULT_LOGTIMESTAMPS |
bool | fLogTimeMicros = DEFAULT_LOGTIMEMICROS |
bool | fLogIPs = DEFAULT_LOGIPS |
CTranslationInterface | translationInterface |
class CInit | instance_of_cinit |
const CLogCategoryDesc | LogCategories [] |
void AllocateFileRange | ( | FILE * | file, |
unsigned int | offset, | ||
unsigned int | length | ||
) |
bool CheckHex | ( | const std::string & | str | ) |
void ClearDatadirCache | ( | ) |
std::string CopyrightHolders | ( | const std::string & | strPrefix | ) |
void CreatePidFile | ( | const fs::path & | path, |
pid_t | pid | ||
) |
void FileCommit | ( | FILE * | file | ) |
std::atomic<bool> fReopenDebugLog | ( | false | ) |
fs::path GetConfigFile | ( | const std::string & | confPath | ) |
const fs::path& GetDataDir | ( | bool | fNetSpecific | ) |
fs::path GetDefaultDataDir | ( | ) |
bool GetLogCategory | ( | uint32_t * | f, |
const std::string * | str | ||
) |
int GetNumCores | ( | ) |
fs::path GetPidFile | ( | ) |
int64_t GetStartupTime | ( | ) |
std::string HelpMessageGroup | ( | const std::string & | message | ) |
std::string HelpMessageOpt | ( | const std::string & | option, |
const std::string & | message | ||
) |
Format a string to be used as option description in help messages.
option | Option message (e.g. "-rpcuser=<user>") |
message | Option description (e.g. "Username for JSON-RPC connections") |
Definition at line 563 of file util.cpp.
std::vector<CLogCategoryActive> ListActiveLogCategories | ( | ) |
std::string ListLogCategories | ( | ) |
void locking_callback | ( | int | mode, |
int | i, | ||
const char * | file, | ||
int | line | ||
) |
bool LogAcceptCategoryChar | ( | const char * | category | ) |
std::atomic<uint32_t> logCategories | ( | 0 | ) |
Log categories bitfield.
int LogPrintStr | ( | const std::string & | str, |
bool | useVMLog | ||
) |
void OpenDebugLog | ( | ) |
void PrintExceptionContinue | ( | const std::exception * | pex, |
const char * | pszThread | ||
) |
int RaiseFileDescriptorLimit | ( | int | nMinFD | ) |
bool RenameOver | ( | fs::path | src, |
fs::path | dest | ||
) |
void RenameThread | ( | const char * | name | ) |
void runCommand | ( | const std::string & | strCommand | ) |
void SetThreadPriority | ( | int | nPriority | ) |
void SetupEnvironment | ( | ) |
bool SetupNetworking | ( | ) |
void ShrinkDebugFile | ( | ) |
bool TruncateFile | ( | FILE * | file, |
unsigned int | length | ||
) |
bool TryCreateDirectories | ( | const fs::path & | p | ) |
ArgsManager gArgs |
class CInit instance_of_cinit |
const CLogCategoryDesc LogCategories[] |
CTranslationInterface translationInterface |