![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include "fs.h"#include "logging.h"#include "compat.h"#include "optional.h"#include "sync.h"#include "tinyformat.h"#include "utiltime.h"#include "util/threadnames.h"#include <atomic>#include <exception>#include <map>#include <memory>#include <set>#include <stdint.h>#include <string>#include <unordered_set>#include <utility>#include <vector>#include <boost/signals2/signal.hpp>#include <boost/thread/condition_variable.hpp>Go to the source code of this file.
Classes | |
| class | CTranslationInterface |
| Server/client environment: argument handling, config file parsing, thread wrappers. More... | |
| class | ArgsManager |
Namespaces | |
| util | |
Functions | |
| std::string | _ (const char *psz) |
| Translation function: Call Translate signal on UI interface, which returns a Optional result. 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 | CheckDiskSpace (const fs::path &dir, uint64_t additional_bytes=0) |
| 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 () |
| const fs::path & | GetDataDir (bool fNetSpecific=true) |
| bool | CheckDataDirOption () |
| const fs::path & | ZC_GetParamsDir () |
| void | initZKSNARKS () |
| void | ClearDatadirCache () |
| fs::path | GetConfigFile (const std::string &confPath) |
| fs::path | GetMasternodeConfigFile () |
| void | runCommand (std::string strCommand) |
| bool | IsSwitchChar (char c) |
| 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 | SetThreadPriority (int nPriority) |
| template<typename Callable > | |
| void | TraceThread (const std::string name, Callable func) |
| fs::path | AbsPathForConfigVal (const fs::path &path, bool net_specific=true) |
| int | ScheduleBatchPriority (void) |
| On platforms that support it, tell the kernel the calling thread is CPU-intensive and non-interactive. More... | |
Variables | |
| const char *const | PIVX_CONF_FILENAME |
| const char *const | PIVX_PID_FILENAME |
| The PID file facilities. More... | |
| const char *const | PIVX_MASTERNODE_CONF_FILENAME |
| const char *const | DEFAULT_DEBUGLOGFILE |
| std::atomic< bool > | fMasterNode |
| CTranslationInterface | translationInterface |
| ArgsManager | gArgs |
|
inline |
Translation function: Call Translate signal on UI interface, which returns a Optional result.
If no translation slot is registered, nothing is returned, and simply return the input.
Definition at line 65 of file system.h.
| fs::path AbsPathForConfigVal | ( | const fs::path & | path, |
| bool | net_specific = true |
||
| ) |
Definition at line 853 of file system.cpp.
| 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
Definition at line 974 of file system.cpp.
| bool CheckDataDirOption | ( | ) |
Definition at line 755 of file system.cpp.
| bool CheckDiskSpace | ( | const fs::path & | dir, |
| uint64_t | additional_bytes = 0 |
||
| ) |
| void ClearDatadirCache | ( | ) |
| bool DirIsWritable | ( | const fs::path & | directory | ) |
Definition at line 140 of file system.cpp.
| bool error | ( | const char * | fmt, |
| const Args &... | args | ||
| ) |
| bool FileCommit | ( | FILE * | file | ) |
| const fs::path& GetBlocksDir | ( | ) |
| fs::path GetConfigFile | ( | const std::string & | confPath | ) |
Definition at line 770 of file system.cpp.
| const fs::path& GetDataDir | ( | bool | fNetSpecific = true | ) |
| fs::path GetDefaultDataDir | ( | ) |
Definition at line 533 of file system.cpp.
| fs::path GetMasternodeConfigFile | ( | ) |
Definition at line 776 of file system.cpp.
| int GetNumCores | ( | ) |
Return the number of cores available on the current system.
Definition at line 1095 of file system.cpp.
| std::string HelpMessageGroup | ( | const std::string & | message | ) |
Format a string to be used as group of options in help messages.
| message | Group name (e.g. "RPC server options:") |
Definition at line 499 of file system.cpp.
| 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 503 of file system.cpp.
| void initZKSNARKS | ( | ) |
Definition at line 624 of file system.cpp.
|
inline |
| 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 | ) |
this function tries to raise the file descriptor limit to the requested number.
It returns the actual file descriptor limit (which may be more or less than nMinFD)
Definition at line 950 of file system.cpp.
| void ReleaseDirectoryLocks | ( | ) |
Release all directory locks.
This is used for unit testing only, at runtime the global destructor will take care of the locks.
Definition at line 134 of file system.cpp.
| bool RenameOver | ( | fs::path | src, |
| fs::path | dest | ||
| ) |
Definition at line 875 of file system.cpp.
| void runCommand | ( | std::string | strCommand | ) |
Definition at line 1031 of file system.cpp.
| int ScheduleBatchPriority | ( | void | ) |
On platforms that support it, tell the kernel the calling thread is CPU-intensive and non-interactive.
See SCHED_BATCH in sched(7) for details.
Definition at line 1101 of file system.cpp.
| void SetThreadPriority | ( | int | nPriority | ) |
Definition at line 1082 of file system.cpp.
| void SetupEnvironment | ( | ) |
| bool SetupNetworking | ( | ) |
| void TraceThread | ( | const std::string | name, |
| Callable | func | ||
| ) |
| bool TruncateFile | ( | FILE * | file, |
| unsigned int | length | ||
| ) |
| bool TryCreateDirectories | ( | const fs::path & | p | ) |
Ignores exceptions thrown by Boost's create_directories if the requested directory exists.
Specifically handles case where path p exists, but it wasn't possible for the user to write to the parent directory.
Definition at line 891 of file system.cpp.
| const fs::path& ZC_GetParamsDir | ( | ) |
|
extern |
Definition at line 11 of file logging.cpp.
|
extern |
Definition at line 87 of file system.cpp.
|
extern |
Definition at line 89 of file system.cpp.
|
extern |
Definition at line 81 of file system.cpp.
|
extern |
Definition at line 82 of file system.cpp.
|
extern |
|
extern |
Definition at line 91 of file system.cpp.