![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include "util.h"
#include "support/allocators/secure.h"
#include "chainparamsbase.h"
#include "random.h"
#include "serialize.h"
#include "sync.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/join.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/foreach.hpp>
#include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.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 |
Functions | |
void | locking_callback (int mode, int i, const char *file, int line) NO_THREAD_SAFETY_ANALYSIS |
static int | FileWriteStr (const std::string &str, FILE *fp) |
static void | DebugPrintInit () |
void | OpenDebugLog () |
bool | LogAcceptCategory (const char *category) |
static std::string | LogTimestampStr (const std::string &str, bool *fStartedNewLine) |
static std::string | LogThreadNameStr (const std::string &str, bool *fStartedNewLine) |
int | LogPrintStr (const std::string &str) |
static bool | InterpretBool (const std::string &strValue) |
static void | InterpretNegativeSetting (std::string &strKey, std::string &strValue) |
void | ParseParameters (int argc, const char *const argv[]) |
std::string | GetArg (const std::string &strArg, const std::string &strDefault) |
int64_t | GetArg (const std::string &strArg, int64_t nDefault) |
bool | GetBoolArg (const std::string &strArg, bool fDefault) |
bool | SoftSetArg (const std::string &strArg, const std::string &strValue) |
bool | SoftSetBoolArg (const std::string &strArg, bool fValue) |
std::string | HelpMessageGroup (const std::string &message) |
std::string | HelpMessageOpt (const std::string &option, const std::string &message) |
static std::string | FormatException (const std::exception *pex, const char *pszThread) |
void | PrintExceptionContinue (const std::exception *pex, const char *pszThread) |
boost::filesystem::path | GetDefaultDataDir () |
const boost::filesystem::path & | GetDataDir (bool fNetSpecific) |
const boost::filesystem::path & | GetBackupsDir () |
void | ClearDatadirCache () |
boost::filesystem::path | GetConfigFile () |
boost::filesystem::path | GetMasternodeConfigFile () |
void | ReadConfigFile (map< string, string > &mapSettingsRet, map< string, vector< string > > &mapMultiSettingsRet) |
boost::filesystem::path | GetPidFile () |
void | CreatePidFile (const boost::filesystem::path &path, pid_t pid) |
bool | RenameOver (boost::filesystem::path src, boost::filesystem::path dest) |
bool | TryCreateDirectory (const boost::filesystem::path &p) |
void | FileCommit (FILE *fileout) |
bool | TruncateFile (FILE *file, unsigned int length) |
int | RaiseFileDescriptorLimit (int nMinFD) |
void | AllocateFileRange (FILE *file, unsigned int offset, unsigned int length) |
void | ShrinkDebugFile () |
boost::filesystem::path | GetTempPath () |
void | runCommand (const std::string &strCommand) |
void | RenameThread (const char *name) |
std::string | GetThreadName () |
void | SetupEnvironment () |
bool | SetupNetworking () |
void | SetThreadPriority (int nPriority) |
int | GetNumCores () |
uint32_t | StringVersionToInt (const std::string &strVersion) |
Converts version strings to 4-byte unsigned integer. More... | |
std::string | IntVersionToString (uint32_t nVersion) |
Converts version as 4-byte unsigned integer to string. More... | |
std::string | SafeIntVersionToString (uint32_t nVersion) |
Copy of the IntVersionToString, that returns "Invalid version" string instead of throwing std::bad_cast. More... | |
Variables | |
bool | fMasterNode = false |
bool | fLiteMode = false |
int | nWalletBackups = 10 |
const char *const | BITCOIN_CONF_FILENAME = "dash.conf" |
const char *const | BITCOIN_PID_FILENAME = "dashd.pid" |
map< string, string > | mapArgs |
map< string, vector< string > > | mapMultiArgs |
bool | fDebug = false |
bool | fPrintToConsole = false |
bool | fPrintToDebugLog = true |
bool | fDaemon = false |
bool | fServer = false |
string | strMiscWarning |
bool | fLogTimestamps = DEFAULT_LOGTIMESTAMPS |
bool | fLogTimeMicros = DEFAULT_LOGTIMEMICROS |
bool | fLogThreadNames = DEFAULT_LOGTHREADNAMES |
bool | fLogIPs = DEFAULT_LOGIPS |
volatile bool | fReopenDebugLog = false |
CTranslationInterface | translationInterface |
static CCriticalSection ** | ppmutexOpenSSL |
class CInit | instance_of_cinit |
static boost::once_flag | debugPrintInitFlag = BOOST_ONCE_INIT |
static FILE * | fileout = NULL |
static boost::mutex * | mutexDebugLog = NULL |
static list< string > * | vMsgsBeforeOpenLog |
static const int | screenWidth = 79 |
static const int | optIndent = 2 |
static const int | msgIndent = 7 |
static boost::filesystem::path | pathCached |
static boost::filesystem::path | pathCachedNetSpecific |
static CCriticalSection | csPathCached |
static boost::filesystem::path | backupsDirCached |
static CCriticalSection | csBackupsDirCached |
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 757 of file util.cpp.
Referenced by FindBlockPos(), and FindUndoPos().
void ClearDatadirCache | ( | ) |
Definition at line 605 of file util.cpp.
Referenced by ReadConfigFile().
void CreatePidFile | ( | const boost::filesystem::path & | path, |
pid_t | pid | ||
) |
Definition at line 664 of file util.cpp.
Referenced by AppInit2().
|
static |
Definition at line 219 of file util.cpp.
Referenced by LogPrintStr(), and OpenDebugLog().
void FileCommit | ( | FILE * | fileout | ) |
Definition at line 705 of file util.cpp.
Referenced by FlushBlockFile(), CAddrDB::Write(), and CBanDB::Write().
|
static |
Definition at line 214 of file util.cpp.
Referenced by LogPrintStr(), and OpenDebugLog().
|
static |
Definition at line 493 of file util.cpp.
Referenced by PrintExceptionContinue().
std::string GetArg | ( | const std::string & | strArg, |
const std::string & | strDefault | ||
) |
Return string argument or default value
strArg | Argument to get (e.g. "-foo") |
default | (e.g. "1") |
Definition at line 441 of file util.cpp.
Referenced by AcceptToMemoryPoolWorker(), ActivateBestChainStep(), CWallet::AddToWallet(), AppInit2(), TorController::auth_cb(), CConnman::Ban(), BitcoinApplication::BitcoinApplication(), BitcoinGUI::BitcoinGUI(), BlockNotifyCallback(), CallRPC(), CreateNewBlock(), CBlockPolicyEstimator::estimateSmartFee(), CBlockPolicyEstimator::estimateSmartPriority(), CDB::Flush(), CWallet::GenerateNewHDChain(), GetAuthCookieFile(), GetConfigFile(), GetLangTerritory(), GetListenPort(), GetMasternodeConfigFile(), getmininginfo(), GetPidFile(), HTTPBindAddresses(), OptionsModel::Init(), CKeePassIntegrator::init(), InitHTTPServer(), InitParameterInteraction(), Intro::Intro(), InvalidateBlock(), PaymentServer::LoadRootCAs(), mempoolInfoToJSON(), Misbehaving(), CAlert::Notify(), Intro::pickDataDirectory(), ProcessMessage(), TorController::protocolinfo_cb(), RPCConsole::RPCConsole(), setgenerate(), CAlert::Sign(), StartHTTPServer(), CWallet::TopUpKeyPool(), TorControlThread(), CWallet::Unlock(), CInstantSend::UpdateLockedTransaction(), and verifychain().
int64_t GetArg | ( | const std::string & | strArg, |
int64_t | nDefault | ||
) |
const boost::filesystem::path& GetBackupsDir | ( | ) |
Definition at line 580 of file util.cpp.
Referenced by AutoBackupWallet(), and GUIUtil::showBackups().
bool GetBoolArg | ( | const std::string & | strArg, |
bool | fDefault | ||
) |
Return boolean argument or default value
strArg | Argument to get (e.g. "-foo") |
default | (true or false) |
Definition at line 455 of file util.cpp.
Referenced by AcceptToMemoryPoolWorker(), AppInit(), AppInit2(), AppInitRawTx(), AppInitRPC(), AppInitServers(), BitcoinGUI::BitcoinGUI(), ChainNameFromCommandLine(), CWallet::ChangeWalletPassphrase(), CommandLineRPC(), CreateNewBlock(), CWallet::EncryptWallet(), getgenerate(), PaymentRequestPlus::getMerchant(), GetWarnings(), HelpMessage(), HelpMessageDialog::HelpMessageDialog(), CKeePassIntegrator::init(), InitBlockIndex(), InitHTTPServer(), BitcoinApplication::initializeResult(), InitLogging(), InitParameterInteraction(), main(), OnRPCPreCommand(), CDBEnv::Open(), OutputTx(), Intro::pickDataDirectory(), ProcessMessage(), SplashScreen::SplashScreen(), CConnman::Start(), CConnman::ThreadDNSAddressSeed(), ThreadFlushWalletDB(), ThreadImport(), CWallet::Unlock(), and CWallet::Verify().
boost::filesystem::path GetConfigFile | ( | ) |
Definition at line 611 of file util.cpp.
Referenced by AppInit2(), CallRPC(), GUIUtil::openConfigfile(), and ReadConfigFile().
const boost::filesystem::path& GetDataDir | ( | bool | fNetSpecific | ) |
Definition at line 547 of file util.cpp.
Referenced by AppInit(), AppInit2(), AppInitRPC(), AutoBackupWallet(), BackupWallet(), CAddrDB::CAddrDB(), CBanDB::CBanDB(), CDB::CDB(), CFlatDB< T >::CFlatDB(), CheckDiskSpace(), CleanupBlockRevFiles(), ClientModel::dataDir(), GetAuthCookieFile(), GetBackupsDir(), GetBlockPosFilename(), GetConfigFile(), GetMasternodeConfigFile(), GetPidFile(), TorController::GetPrivateKeyFile(), ipcServerName(), LogPrintStr(), main(), OpenDebugLog(), GUIUtil::openDebugLogfile(), PrepareShutdown(), RPCConsole::RPCConsole(), ShrinkDebugFile(), ThreadImport(), CWallet::Verify(), CAddrDB::Write(), and CBanDB::Write().
boost::filesystem::path GetDefaultDataDir | ( | ) |
Definition at line 516 of file util.cpp.
Referenced by AppInit2(), GetDataDir(), and Intro::getDefaultDataDirectory().
boost::filesystem::path GetMasternodeConfigFile | ( | ) |
Definition at line 620 of file util.cpp.
Referenced by AppInit2(), GUIUtil::openMNConfigfile(), and CMasternodeConfig::read().
int GetNumCores | ( | ) |
Return the number of physical cores available on the current system.
Definition at line 948 of file util.cpp.
Referenced by AppInit2(), GenerateBitcoins(), HelpMessage(), and OptionsDialog::OptionsDialog().
boost::filesystem::path GetPidFile | ( | ) |
Definition at line 657 of file util.cpp.
Referenced by AppInit2(), and PrepareShutdown().
std::string GetThreadName | ( | ) |
Definition at line 889 of file util.cpp.
Referenced by LogAcceptCategory(), and LogThreadNameStr().
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 482 of file util.cpp.
Referenced by AppendParamsHelpMessages(), AppInitRawTx(), HelpMessage(), HelpMessageCli(), and HelpMessageDialog::HelpMessageDialog().
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 486 of file util.cpp.
Referenced by AppendParamsHelpMessages(), AppInitRawTx(), HelpMessage(), HelpMessageCli(), and HelpMessageDialog::HelpMessageDialog().
|
static |
Interpret string as boolean, for argument parsing
Definition at line 389 of file util.cpp.
Referenced by GetBoolArg(), and InterpretNegativeSetting().
|
static |
Turn -noX into -X=0
Definition at line 397 of file util.cpp.
Referenced by ParseParameters(), and ReadConfigFile().
std::string IntVersionToString | ( | uint32_t | nVersion | ) |
Converts version as 4-byte unsigned integer to string.
nVersion | 4-byte unsigned integer, most significant byte is always 0 |
Definition at line 978 of file util.cpp.
Referenced by SafeIntVersionToString().
void locking_callback | ( | int | mode, |
int | i, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 139 of file util.cpp.
Referenced by CInit::CInit().
bool LogAcceptCategory | ( | const char * | category | ) |
Return true if log accepts specified category
Definition at line 247 of file util.cpp.
Referenced by InitHTTPServer(), LogPrint(), and CWallet::SelectCoinsGrouppedByAddresses().
int LogPrintStr | ( | const std::string & | str | ) |
Send a string to the log output
Definition at line 342 of file util.cpp.
Referenced by error(), and LogPrint().
|
static |
fStartedNewLine is a state variable held by the calling context that will suppress printing of the thread name when multiple calls are made that don't end in a newline. Initialize it to true, and hold/manage it, in the calling context.
Definition at line 325 of file util.cpp.
Referenced by LogPrintStr().
|
static |
fStartedNewLine is a state variable held by the calling context that will suppress printing of the timestamp when multiple calls are made that don't end in a newline. Initialize it to true, and hold/manage it, in the calling context.
Definition at line 301 of file util.cpp.
Referenced by LogPrintStr().
void OpenDebugLog | ( | ) |
Definition at line 226 of file util.cpp.
Referenced by AppInit2().
void ParseParameters | ( | int | argc, |
const char *const | argv[] | ||
) |
Definition at line 406 of file util.cpp.
Referenced by AppInit(), AppInitRawTx(), AppInitRPC(), and main().
void PrintExceptionContinue | ( | const std::exception * | pex, |
const char * | pszThread | ||
) |
Definition at line 509 of file util.cpp.
Referenced by AppInit(), CommandLineRawTx(), CommandLineRPC(), BitcoinCore::handleRunawayException(), main(), ProcessMessages(), and TraceThread().
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 734 of file util.cpp.
Referenced by AppInit2().
void ReadConfigFile | ( | map< string, string > & | mapSettingsRet, |
map< string, vector< string > > & | mapMultiSettingsRet | ||
) |
Definition at line 627 of file util.cpp.
Referenced by AppInit(), AppInitRPC(), and main().
bool RenameOver | ( | boost::filesystem::path | src, |
boost::filesystem::path | dest | ||
) |
Definition at line 675 of file util.cpp.
Referenced by ThreadImport(), CAddrDB::Write(), and CBanDB::Write().
void RenameThread | ( | const char * | name | ) |
Definition at line 873 of file util.cpp.
Referenced by BitcoinMiner(), HTTPWorkQueueRun(), PrepareShutdown(), ThreadCheckPrivateSend(), ThreadCheckPrivateSendClient(), ThreadCheckPrivateSendServer(), ThreadFlushWalletDB(), ThreadHTTP(), ThreadImport(), ThreadScriptCheck(), and TraceThread().
void runCommand | ( | const std::string & | strCommand | ) |
Definition at line 866 of file util.cpp.
Referenced by CWallet::AddToWallet(), BlockNotifyCallback(), CAlert::Notify(), and CInstantSend::UpdateLockedTransaction().
std::string SafeIntVersionToString | ( | uint32_t | nVersion | ) |
Copy of the IntVersionToString, that returns "Invalid version" string instead of throwing std::bad_cast.
nVersion | 4-byte unsigned integer, most significant byte is always 0 |
Definition at line 994 of file util.cpp.
Referenced by masternodelist().
void SetThreadPriority | ( | int | nPriority | ) |
Definition at line 935 of file util.cpp.
Referenced by BitcoinMiner(), SetThreadPriority(), and CConnman::ThreadMessageHandler().
bool SetupNetworking | ( | ) |
Definition at line 923 of file util.cpp.
Referenced by AppInit2(), and main().
void ShrinkDebugFile | ( | ) |
Definition at line 799 of file util.cpp.
Referenced by AppInit2().
bool SoftSetArg | ( | const std::string & | strArg, |
const std::string & | strValue | ||
) |
Set an argument if it doesn't already have a value
strArg | Argument to set (e.g. "-foo") |
strValue | Value (e.g. "1") |
Definition at line 462 of file util.cpp.
Referenced by OptionsModel::Init(), InitParameterInteraction(), Intro::pickDataDirectory(), and SoftSetBoolArg().
bool SoftSetBoolArg | ( | const std::string & | strArg, |
bool | fValue | ||
) |
Set a boolean argument if it doesn't already have a value
strArg | Argument to set (e.g. "-foo") |
fValue | Value (e.g. false) |
Definition at line 470 of file util.cpp.
Referenced by AppInit(), OptionsModel::Init(), InitParameterInteraction(), and CWalletDB::LoadWallet().
uint32_t StringVersionToInt | ( | const std::string & | strVersion | ) |
Converts version strings to 4-byte unsigned integer.
strVersion | version in "x.x.x" format (decimal digits only) |
Definition at line 958 of file util.cpp.
Referenced by sentinelping().
bool TruncateFile | ( | FILE * | file, |
unsigned int | length | ||
) |
Definition at line 722 of file util.cpp.
Referenced by FlushBlockFile().
bool TryCreateDirectory | ( | const boost::filesystem::path & | p | ) |
Ignores exceptions thrown by Boost's create_directory 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 691 of file util.cpp.
Referenced by CDBWrapper::CDBWrapper(), CDBEnv::Open(), and Intro::pickDataDirectory().
|
static |
Definition at line 577 of file util.cpp.
Referenced by GetBackupsDir().
const char* const BITCOIN_CONF_FILENAME = "dash.conf" |
Definition at line 119 of file util.cpp.
Referenced by GetConfigFile(), getgenerate(), HelpMessage(), and HelpMessageCli().
const char* const BITCOIN_PID_FILENAME = "dashd.pid" |
Definition at line 120 of file util.cpp.
Referenced by GetPidFile(), and HelpMessage().
|
static |
Definition at line 578 of file util.cpp.
Referenced by GetBackupsDir().
|
static |
Definition at line 545 of file util.cpp.
Referenced by GetDataDir().
|
static |
LogPrintf() has been broken a couple of times now by well-meaning people adding mutexes in the most straightforward way. It breaks because it may be called by global destructors during shutdown. Since the order of destruction of static/global objects is undefined, defining a mutex as a global object doesn't work (the mutex gets destroyed, and then some later destructor calls OutputDebugStringF, maybe indirectly, and you get a core dump at shutdown trying to lock the mutex).
Definition at line 199 of file util.cpp.
Referenced by LogPrintStr(), and OpenDebugLog().
bool fDebug = false |
Definition at line 124 of file util.cpp.
Referenced by AppInit2(), debug(), IsBlockPayeeValid(), IsBlockValueValid(), LogAcceptCategory(), ProcessMessage(), CConnman::SetNetworkActive(), TransactionDesc::toHTML(), and CoinControlDialog::updateView().
|
static |
We use boost::call_once() to make sure mutexDebugLog and vMsgsBeforeOpenLog are initialized in a thread-safe manner.
NOTE: fileout, mutexDebugLog and sometimes vMsgsBeforeOpenLog are leaked on exit. This is ugly, but will be cleaned up by the OS/libc. When the shutdown sequence is fully audited and tested, explicit destruction of these objects can be implemented.
Definition at line 210 of file util.cpp.
Referenced by FileCommit(), LogPrintStr(), OpenDebugLog(), CFlatDB< T >::Write(), CAddrDB::Write(), CBanDB::Write(), TxConfirmStats::Write(), CBlockPolicyEstimator::Write(), WriteBlockToDisk(), and CTxMemPool::WriteFeeEstimates().
bool fLiteMode = false |
Definition at line 109 of file util.cpp.
Referenced by AppInit2(), CGovernanceManager::DoMaintenance(), CWallet::GetAnonymizableBalance(), CWallet::GetAnonymizedBalance(), CWallet::GetAverageAnonymizedRounds(), CWallet::GetDenominatedBalance(), getinfo(), CWallet::GetNeedsToBeAnonymizedBalance(), CWallet::GetNormalizedAnonymizedBalance(), OverviewPage::OverviewPage(), CMasternodePayments::ProcessBlock(), CPrivateSendServer::ProcessMessage(), CInstantSend::ProcessMessage(), CPrivateSendClient::ProcessMessage(), CMasternodeMan::ProcessMessage(), CMasternodePayments::ProcessMessage(), CGovernanceManager::ProcessMessage(), CSporkManager::ProcessSpork(), SendCoinsDialog::SendCoinsDialog(), ThreadCheckPrivateSend(), ThreadCheckPrivateSendClient(), ThreadCheckPrivateSendServer(), OverviewPage::updateAdvancedPSUI(), CPrivateSendClient::UpdatedBlockTip(), CMasternodeMan::UpdateLastPaid(), and OverviewPage::~OverviewPage().
bool fLogIPs = DEFAULT_LOGIPS |
Definition at line 133 of file util.cpp.
Referenced by CNode::CNode(), InitLogging(), and ProcessMessage().
bool fLogThreadNames = DEFAULT_LOGTHREADNAMES |
Definition at line 132 of file util.cpp.
Referenced by InitLogging(), and LogThreadNameStr().
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS |
Definition at line 131 of file util.cpp.
Referenced by InitLogging(), and LogTimestampStr().
bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS |
Definition at line 130 of file util.cpp.
Referenced by AppInit2(), InitLogging(), and LogTimestampStr().
bool fMasterNode = false |
Definition at line 108 of file util.cpp.
Referenced by CConnman::AcceptConnection(), CPrivateSendServer::AddEntry(), CPrivateSendServer::AddUserToExistingSession(), AppInit2(), CWallet::AvailableCoins(), CPrivateSendServer::ChargeFees(), CPrivateSendServer::ChargeRandomFees(), CMasternode::Check(), CPrivateSendServer::CheckForCompleteQueue(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), CMasternodeBroadcast::CheckOutpoint(), CPrivateSendServer::CheckPool(), CPrivateSendClient::CheckPoolStateUpdate(), CPrivateSendServer::CheckTimeout(), CPrivateSendClient::CheckTimeout(), CPrivateSendServer::CommitFinalTransaction(), CPrivateSendClient::CompletedTransaction(), CPrivateSendServer::CreateNewSession(), CPrivateSendClient::DoAutomaticDenominating(), getpoolinfo(), CPrivateSendServer::IsAcceptableDenomAndCollateral(), CMasternodePaymentVote::IsValid(), CActiveMasternode::ManageState(), masternode(), OverviewPage::OverviewPage(), privatesend(), CMasternodePayments::ProcessBlock(), CPrivateSendServer::ProcessMessage(), CPrivateSendClient::ProcessMessage(), CMasternodeSync::ProcessTick(), CGovernanceManager::RequestGovernanceObjectVotes(), CWallet::SelectCoinsDark(), CWallet::SelectCoinsGrouppedByAddresses(), CPrivateSendClient::SendDenominate(), CMasternodeMan::SendVerifyReply(), CPrivateSendServer::SetState(), CDarksendQueue::Sign(), CDarksendBroadcastTx::Sign(), CPrivateSendClient::SignFinalTransaction(), CGovernanceManager::Sync(), ThreadCheckPrivateSend(), CMasternodeBroadcast::Update(), CMasternodeMan::UpdatedBlockTip(), CMasternode::UpdateFromNewBroadcast(), CMasternodeMan::UpdateLastPaid(), CInstantSend::Vote(), and OverviewPage::~OverviewPage().
bool fPrintToConsole = false |
Definition at line 125 of file util.cpp.
Referenced by InitLogging(), and LogPrintStr().
bool fPrintToDebugLog = true |
Definition at line 126 of file util.cpp.
Referenced by AppInit2(), InitLogging(), LogPrintStr(), and main().
volatile bool fReopenDebugLog = false |
Definition at line 134 of file util.cpp.
Referenced by HandleSIGHUP(), and LogPrintStr().
bool fServer = false |
Definition at line 128 of file util.cpp.
Referenced by AppInit2().
class CInit instance_of_cinit |
map<string, string> mapArgs |
Definition at line 122 of file util.cpp.
Referenced by OptionsModel::addOverriddenOption(), AppInit(), AppInit2(), AppInitRawTx(), AppInitRPC(), CallRPC(), debug(), CWallet::GenerateNewHDChain(), GetArg(), GetBackupsDir(), GetBoolArg(), GetDataDir(), HTTPBindAddresses(), InitParameterInteraction(), InitRPCAuthentication(), main(), ParseParameters(), ProcessMessage(), setgenerate(), SoftSetArg(), CConnman::ThreadMnbRequestConnections(), CConnman::ThreadOpenConnections(), ThreadSendAlert(), and CDSNotificationInterface::UpdatedBlockTip().
map<string, vector<string> > mapMultiArgs |
Definition at line 123 of file util.cpp.
Referenced by AppInit(), AppInit2(), AppInitRPC(), debug(), HTTPBindAddresses(), InitHTTPAllowList(), InitParameterInteraction(), LogAcceptCategory(), main(), multiUserAuthorized(), ParseParameters(), CConnman::ThreadMnbRequestConnections(), CConnman::ThreadOpenAddedConnections(), and CConnman::ThreadOpenConnections().
|
static |
Definition at line 480 of file util.cpp.
Referenced by HelpMessageOpt().
|
static |
Definition at line 211 of file util.cpp.
Referenced by DebugPrintInit(), LogPrintStr(), and OpenDebugLog().
int nWalletBackups = 10 |
nWalletBackups: 1..10 - number of automatic backups to keep 0 - disabled by command-line -1 - disabled because of some error during run-time -2 - disabled because wallet was locked and we were not able to replenish keypool
Definition at line 117 of file util.cpp.
Referenced by AppInit2(), AutoBackupWallet(), CPrivateSendClient::CheckAutomaticBackup(), OverviewPage::DisablePrivateSendCompletely(), HelpMessage(), CWallet::KeepKey(), OverviewPage::OverviewPage(), OverviewPage::privateSendStatus(), and CWallet::Unlock().
|
static |
Definition at line 479 of file util.cpp.
Referenced by HelpMessageOpt().
|
static |
Definition at line 543 of file util.cpp.
Referenced by ClearDatadirCache(), and GetDataDir().
|
static |
Definition at line 544 of file util.cpp.
Referenced by ClearDatadirCache(), and GetDataDir().
|
static |
Init OpenSSL library multithreading support
Definition at line 138 of file util.cpp.
Referenced by CInit::CInit(), locking_callback(), and CInit::~CInit().
|
static |
Definition at line 478 of file util.cpp.
Referenced by HelpMessageOpt().
string strMiscWarning |
Definition at line 129 of file util.cpp.
Referenced by AddTimeData(), GetBackupsDir(), GetWarnings(), BitcoinCore::handleRunawayException(), main(), and UpdateTip().
CTranslationInterface translationInterface |
|
static |
Definition at line 212 of file util.cpp.
Referenced by DebugPrintInit(), LogPrintStr(), and OpenDebugLog().