![]() |
BSHA3
0.17.99
P2P Blockchain, based on Bitcoin
|
#include <util.h>#include <chainparamsbase.h>#include <random.h>#include <serialize.h>#include <utilstrencodings.h>#include <stdarg.h>#include <algorithm>#include <fcntl.h>#include <sched.h>#include <sys/resource.h>#include <sys/stat.h>#include <boost/thread.hpp>#include <openssl/crypto.h>#include <openssl/rand.h>#include <openssl/conf.h>#include <thread>Go to the source code of this file.
Classes | |
| class | CInit |
| class | ArgsManagerHelper |
| Internal helper functions for ArgsManager. More... | |
Namespaces | |
| util | |
Functions | |
| void | locking_callback (int mode, int i, const char *file, int line) NO_THREAD_SAFETY_ANALYSIS |
| bool | LockDirectory (const fs::path &directory, const std::string lockfile_name, bool probe_only) |
| void | ReleaseDirectoryLocks () |
| Release all directory locks. More... | |
| bool | DirIsWritable (const fs::path &directory) |
| bool | HelpRequested (const ArgsManager &args) |
| 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 & | GetBlocksDir (bool fNetSpecific) |
| 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... | |
| bool | 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 | runCommand (const std::string &strCommand) |
| void | RenameThread (const char *name) |
| void | SetupEnvironment () |
| bool | SetupNetworking () |
| int | GetNumCores () |
| Return the number of 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, thread wrappers, startup time. More... | |
| fs::path | AbsPathForConfigVal (const fs::path &path, bool net_specific) |
| Most paths passed as configuration arguments are treated as relative to the datadir if they are not absolute. More... | |
| void | SetThreadPriority (int nPriority) |
| int | ScheduleBatchPriority (void) |
| On platforms that support it, tell the kernel the calling thread is CPU-intensive and non-interactive. More... | |
Variables | |
| const int64_t | nStartupTime = GetTime() |
| const char *const | BITCOIN_CONF_FILENAME = "bitcoin.conf" |
| const char *const | BITCOIN_PID_FILENAME = "bsha3d.pid" |
| ArgsManager | gArgs |
| class CInit | instance_of_cinit |
| fs::path AbsPathForConfigVal | ( | const fs::path & | path, |
| bool | net_specific = true |
||
| ) |
Most paths passed as configuration arguments are treated as relative to the datadir if they are not absolute.
| path | The path to be conditionally prefixed with datadir. |
| net_specific | Forwarded to GetDataDir(). |
Definition at line 1255 of file util.cpp.
| void AllocateFileRange | ( | FILE * | file, |
| unsigned int | offset, | ||
| unsigned int | length | ||
| ) |
| std::string CopyrightHolders | ( | const std::string & | strPrefix | ) |
| void CreatePidFile | ( | const fs::path & | path, |
| pid_t | pid | ||
| ) |
| bool DirIsWritable | ( | const fs::path & | directory | ) |
| const fs::path& GetBlocksDir | ( | bool | fNetSpecific | ) |
| fs::path GetConfigFile | ( | const std::string & | confPath | ) |
| const fs::path& GetDataDir | ( | bool | fNetSpecific | ) |
| fs::path GetDefaultDataDir | ( | ) |
| 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 675 of file util.cpp.
| bool HelpRequested | ( | const ArgsManager & | args | ) |
| bool LockDirectory | ( | const fs::path & | directory, |
| const std::string | lockfile_name, | ||
| bool | probe_only | ||
| ) |
| void locking_callback | ( | int | mode, |
| int | i, | ||
| const char * | file, | ||
| int | line | ||
| ) |
| void PrintExceptionContinue | ( | const std::exception * | pex, |
| const char * | pszThread | ||
| ) |
| int RaiseFileDescriptorLimit | ( | int | nMinFD | ) |
| void ReleaseDirectoryLocks | ( | ) |
| void RenameThread | ( | const char * | name | ) |
| void runCommand | ( | const std::string & | strCommand | ) |
| int ScheduleBatchPriority | ( | ) |
| void SetThreadPriority | ( | int | nPriority | ) |
| void SetupEnvironment | ( | ) |
| bool SetupNetworking | ( | ) |
| bool TryCreateDirectories | ( | const fs::path & | p | ) |
| ArgsManager gArgs |
| class CInit instance_of_cinit |
1.8.14