![]() |
BSHA3
0.17.99
P2P Blockchain, based on Bitcoin
|
#include <compat.h>#include <fs.h>#include <logging.h>#include <sync.h>#include <tinyformat.h>#include <utilmemory.h>#include <utiltime.h>#include <atomic>#include <exception>#include <map>#include <set>#include <stdint.h>#include <string>#include <unordered_set>#include <utility>#include <vector>#include <boost/thread/condition_variable.hpp>Go to the source code of this file.
Classes | |
| class | ArgsManager |
| struct | ArgsManager::Arg |
Namespaces | |
| util | |
Functions | |
| int64_t | GetStartupTime () |
| Server/client environment: argument handling, config file parsing, thread wrappers, startup time. More... | |
| std::string | _ (const char *psz) |
| Translation function. More... | |
| void | SetupEnvironment () |
| bool | SetupNetworking () |
| template<typename... Args> | |
| bool | error (const char *fmt, const Args &... args) |
| void | PrintExceptionContinue (const std::exception *pex, const char *pszThread) |
| 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... | |
| bool | RenameOver (fs::path src, fs::path dest) |
| bool | LockDirectory (const fs::path &directory, const std::string lockfile_name, bool probe_only=false) |
| bool | DirIsWritable (const fs::path &directory) |
| void | ReleaseDirectoryLocks () |
| Release all directory locks. More... | |
| bool | TryCreateDirectories (const fs::path &p) |
| Ignores exceptions thrown by Boost's create_directories if the requested directory exists. More... | |
| fs::path | GetDefaultDataDir () |
| const fs::path & | GetBlocksDir (bool fNetSpecific=true) |
| const fs::path & | GetDataDir (bool fNetSpecific=true) |
| void | ClearDatadirCache () |
| fs::path | GetConfigFile (const std::string &confPath) |
| fs::path | GetPidFile () |
| void | CreatePidFile (const fs::path &path, pid_t pid) |
| void | runCommand (const std::string &strCommand) |
| 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. More... | |
| bool | IsSwitchChar (char c) |
| 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... | |
| int | GetNumCores () |
| Return the number of cores available on the current system. More... | |
| void | RenameThread (const char *name) |
| template<typename Callable > | |
| void | TraceThread (const char *name, Callable func) |
| std::string | CopyrightHolders (const std::string &strPrefix) |
| int | ScheduleBatchPriority () |
| On platforms that support it, tell the kernel the calling thread is CPU-intensive and non-interactive. More... | |
| void | SetThreadPriority (int nPriority) |
| template<typename Tdst , typename Tsrc > | |
| void | util::insert (Tdst &dst, const Tsrc &src) |
| Simplification of std insertion. More... | |
| template<typename TsetT , typename Tsrc > | |
| void | util::insert (std::set< TsetT > &dst, const Tsrc &src) |
Variables | |
| const char *const | BITCOIN_CONF_FILENAME |
| const char *const | BITCOIN_PID_FILENAME |
| const std::function< std::string(const char *)> | G_TRANSLATION_FUN |
| Translate a message to the native language of the user. More... | |
| ArgsManager | gArgs |
|
strong |
|
inline |
| 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 | ) |
| bool error | ( | const char * | fmt, |
| const Args &... | args | ||
| ) |
| const fs::path& GetBlocksDir | ( | bool | fNetSpecific = true | ) |
| fs::path GetConfigFile | ( | const std::string & | confPath | ) |
| const fs::path& GetDataDir | ( | bool | fNetSpecific = true | ) |
| 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 = false |
||
| ) |
| 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 | ( | ) |
| void TraceThread | ( | const char * | name, |
| Callable | func | ||
| ) |
| bool TryCreateDirectories | ( | const fs::path & | p | ) |
| const std::function<std::string(const char*)> G_TRANSLATION_FUN |
Translate a message to the native language of the user.
Translate a message to the native language of the user.
Definition at line 16 of file bench_bitcoin.cpp.
| ArgsManager gArgs |
1.8.14