 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
13 #ifndef BITCOIN_UTIL_H
14 #define BITCOIN_UTIL_H
16 #if defined(HAVE_CONFIG_H)
34 #include <boost/thread/exceptions.hpp>
52 extern std::map<std::string, std::string>
mapArgs;
53 extern std::map<std::string, std::vector<std::string> >
mapMultiArgs;
60 template<
typename... Args>
61 bool error(
const char* fmt,
const Args&... args)
76 const fs::path &
GetDataDir(
bool fNetSpecific =
true);
84 void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
86 fs::path GetSpecialFolderPath(
int nFolder,
bool fCreate =
true);
95 return c ==
'-' || c ==
'/';
108 std::string
GetArg(
const std::string& strArg,
const std::string& strDefault);
117 int64_t
GetArg(
const std::string& strArg, int64_t nDefault);
126 bool GetBoolArg(
const std::string& strArg,
bool fDefault);
135 bool SoftSetArg(
const std::string& strArg,
const std::string& strValue);
161 std::string
HelpMessageOpt(
const std::string& option,
const std::string& message);
168 template <
typename Callable>
177 }
catch (
const boost::thread_interrupted&) {
180 }
catch (
const std::exception& e) {
189 fs::path
AbsPathForConfigVal(
const boost::filesystem::path& path,
bool net_specific =
true);
192 #endif // BITCOIN_UTIL_H
fs::path AbsPathForConfigVal(const boost::filesystem::path &path, bool net_specific=true)
std::string strMasterNodeAddr
std::string strMiscWarning
void PrintExceptionContinue(const std::exception *pex, const char *pszThread)
std::string HelpMessageOpt(const std::string &option, const std::string &message)
Format a string to be used as option description in help messages.
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 i...
bool SoftSetBoolArg(const std::string &strArg, bool fValue)
Set a boolean argument if it doesn't already have a value.
bool GetBoolArg(const std::string &strArg, bool fDefault)
Return boolean argument or default value.
int64_t enforceMasternodePaymentsTime
fs::path GetMasternodeConfigFile()
int RaiseFileDescriptorLimit(int nMinFD)
this function tries to raise the file descriptor limit to the requested number.
bool TruncateFile(FILE *file, unsigned int length)
void runCommand(std::string strCommand)
bool IsSwitchChar(char c)
std::vector< int64_t > obfuScationDenominations
All denominations used by obfuscation.
const char *const DEFAULT_DEBUGLOGFILE
Server/client environment: argument handling, config file parsing, thread wrappers.
void ThreadRename(std::string &&)
Rename a thread both in terms of an internal (in-memory) name as well as its system thread name.
void SetThreadPriority(int nPriority)
bool RenameOver(fs::path src, fs::path dest)
void ReadConfigFile(std::map< std::string, std::string > &mapSettingsRet, std::map< std::string, std::vector< std::string > > &mapMultiSettingsRet)
bool PointHashingSuccessively(const CPubKey &pk, const unsigned char *tweak, unsigned char *out)
void FileCommit(FILE *fileout)
std::string strBudgetMode
std::string GetArg(const std::string &strArg, const std::string &strDefault)
Return string argument or default value.
bool SoftSetArg(const std::string &strArg, const std::string &strValue)
Set an argument if it doesn't already have a value.
An encapsulated public key.
bool TryCreateDirectory(const fs::path &p)
Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
fs::path GetDefaultDataDir()
void CreatePidFile(const fs::path &path, pid_t pid)
std::map< std::string, std::string > mapArgs
void TraceThread(const char *name, Callable func)
std::string HelpMessageGroup(const std::string &message)
Format a string to be used as group of options in help messages.
void ParseParameters(int argc, const char *const argv[])
const fs::path & GetDataDir(bool fNetSpecific=true)
bool error(const char *fmt, const Args &... args)
std::map< std::string, std::vector< std::string > > mapMultiArgs