Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <compat.h>
#include <fs.h>
#include <sync.h>
#include <tinyformat.h>
#include <utiltime.h>
#include <amount.h>
#include <atomic>
#include <exception>
#include <map>
#include <memory>
#include <set>
#include <stdint.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <boost/signals2/signal.hpp>
#include <boost/thread/condition_variable.hpp>
Go to the source code of this file.
Classes | |
class | CTranslationInterface |
Signals for translation. More... | |
struct | CLogCategoryActive |
class | ArgsManager |
Namespaces | |
BCLog | |
ctpl | |
Macros | |
#define | DBG(x) |
Server/client environment: argument handling, config file parsing, logging, thread wrappers, startup time. More... | |
#define | LogPrintf(...) |
#define | LogPrint(category, ...) |
Enumerations | |
enum | BCLog::LogFlags : uint64_t { BCLog::NONE = 0, BCLog::NET = (1 << 0), BCLog::TOR = (1 << 1), BCLog::MEMPOOL = (1 << 2), BCLog::HTTP = (1 << 3), BCLog::BENCHMARK = (1 << 4), BCLog::ZMQ = (1 << 5), BCLog::DB = (1 << 6), BCLog::RPC = (1 << 7), BCLog::ESTIMATEFEE = (1 << 8), BCLog::ADDRMAN = (1 << 9), BCLog::SELECTCOINS = (1 << 10), BCLog::REINDEX = (1 << 11), BCLog::CMPCTBLOCK = (1 << 12), BCLog::RANDOM = (1 << 13), BCLog::PRUNE = (1 << 14), BCLog::PROXY = (1 << 15), BCLog::MEMPOOLREJ = (1 << 16), BCLog::LIBEVENT = (1 << 17), BCLog::COINDB = (1 << 18), BCLog::QT = (1 << 19), BCLog::LEVELDB = (1 << 20), BCLog::CHAINLOCKS = ((uint64_t)1 << 32), BCLog::GOBJECT = ((uint64_t)1 << 33), BCLog::INSTANTSEND = ((uint64_t)1 << 34), BCLog::KEEPASS = ((uint64_t)1 << 35), BCLog::LLMQ = ((uint64_t)1 << 36), BCLog::LLMQ_DKG = ((uint64_t)1 << 37), BCLog::LLMQ_SIGS = ((uint64_t)1 << 38), BCLog::MNPAYMENTS = ((uint64_t)1 << 39), BCLog::MNSYNC = ((uint64_t)1 << 40), BCLog::PRIVATESEND = ((uint64_t)1 << 41), BCLog::SPORK = ((uint64_t)1 << 42), BCLog::NETCONN = ((uint64_t)1 << 43), BCLog::NET_NETCONN = NET | NETCONN, BCLog::ALL = ~(uint64_t)0 } |
Functions | |
int64_t | GetStartupTime () |
std::string | _ (const char *psz) |
Translation function: Call Translate signal on UI interface, which returns a boost::optional result. More... | |
void | SetupEnvironment () |
bool | SetupNetworking () |
static bool | LogAcceptCategory (uint64_t category) |
std::string | ListLogCategories () |
Returns a string with the log categories. More... | |
std::string | ListActiveLogCategoriesString () |
Returns a string with the list of active log categories. More... | |
std::vector< CLogCategoryActive > | ListActiveLogCategories () |
Returns a vector of the active log categories. More... | |
bool | GetLogCategory (uint64_t *f, const std::string *str) |
Return true if str parses as a log category and set the flags in f. More... | |
int | LogPrintStr (const std::string &str) |
Send a string to the log output. More... | |
template<typename... Args> | |
std::string | SafeStringFormat (const std::string &fmt, const Args &... args) |
Formats a string without throwing exceptions. More... | |
template<typename... Args> | |
std::string | FormatStringFromLogArgs (const char *fmt, const Args &... args) |
Get format string from VA_ARGS for error reporting. More... | |
static void | MarkUsed () |
template<typename T , typename... Args> | |
static void | MarkUsed (const T &t, const Args &... args) |
template<typename... Args> | |
bool | error (const char *fmt, const Args &... args) |
void | PrintExceptionContinue (const std::exception_ptr pex, const char *pszExceptionOrigin) |
void | 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) |
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 & | GetDataDir (bool fNetSpecific=true) |
fs::path | GetBackupsDir () |
void | ClearDatadirCache () |
fs::path | GetConfigFile (const std::string &confPath) |
fs::path | GetPidFile () |
void | CreatePidFile (const fs::path &path, pid_t pid) |
fs::path | GetDebugLogPath () |
bool | OpenDebugLog () |
void | ShrinkDebugFile () |
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) |
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 physical cores available on the current system. More... | |
void | RenameThread (const char *name) |
std::string | GetThreadName () |
void | RenameThreadPool (ctpl::thread_pool &tp, const char *baseName) |
template<typename Callable > | |
void | TraceThread (const std::string name, Callable func) |
std::string | CopyrightHolders (const std::string &strPrefix, unsigned int nStartYear, unsigned int nEndYear) |
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... | |
template<typename T , typename... Args> | |
std::unique_ptr< T > | MakeUnique (Args &&... args) |
Substitute for C++14 std::make_unique. More... | |
Variables | |
bool | fMasternodeMode |
bool | fDisableGovernance |
int | nWalletBackups |
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 More... | |
static const bool | DEFAULT_LOGTIMEMICROS = false |
static const bool | DEFAULT_LOGIPS = false |
static const bool | DEFAULT_LOGTIMESTAMPS = true |
static const bool | DEFAULT_LOGTHREADNAMES = false |
const char *const | DEFAULT_DEBUGLOGFILE |
bool | fPrintToConsole |
bool | fPrintToDebugLog |
bool | fLogTimestamps |
bool | fLogTimeMicros |
bool | fLogThreadNames |
bool | fLogIPs |
std::atomic< bool > | fReopenDebugLog |
CTranslationInterface | translationInterface |
const char *const | BITCOIN_CONF_FILENAME |
const char *const | BITCOIN_PID_FILENAME |
std::atomic< uint64_t > | logCategories |
ArgsManager | gArgs |
Macro Definition Documentation
◆ DBG
#define DBG | ( | x | ) |
Server/client environment: argument handling, config file parsing, logging, thread wrappers, startup time.
Definition at line 47 of file util.h.
Referenced by CHDChain::Debug(), and CWallet::EncryptWallet().
◆ LogPrint
#define LogPrint | ( | category, | |
... | |||
) |
Definition at line 214 of file util.h.
Referenced by CConnman::AcceptConnection(), CMasternodeSync::AcceptedBlockHeader(), AcceptToMemoryPoolWithTime(), CAddrMan::Add(), TorController::add_onion_cb(), CPrivateSendServer::AddEntry(), CGovernanceManager::AddGovernanceObject(), CGovernanceTriggerManager::AddNewTrigger(), llmq::CInstantSendManager::AddNonLockedTx(), AddOrphanTx(), llmq::CLLMQUtils::AddQuorumProbeConnections(), CPrivateSendServer::AddScriptSig(), AddTimeData(), CPrivateSendServer::AddUserToExistingSession(), AdvertiseLocal(), llmq::CSigningManager::AsyncSignIfMember(), TorController::auth_cb(), TorController::authchallenge_cb(), CCoinsViewDB::BatchWrite(), PeerLogicValidation::BlockConnected(), llmq::CQuorumManager::BuildQuorumContributions(), llmq::CQuorumManager::BuildQuorumFromCommitment(), CMasternodeSync::BumpAssetLastTime(), CalcCbTxMerkleRootMNList(), CalcCbTxMerkleRootQuorums(), CPrivateSendServer::ChargeFees(), CPrivateSendServer::ChargeRandomFees(), CTxMemPool::check(), CPrivateSendClientManager::CheckAutomaticBackup(), llmq::CInstantSendManager::CheckCanLock(), CheckCbTxMerkleRoots(), CPrivateSend::CheckDSTXes(), CPrivateSendServer::CheckForCompleteQueue(), CPrivateSendServer::CheckPool(), CGovernanceManager::CheckPostponedObjects(), CPrivateSendBaseManager::CheckQueue(), CGovernanceVote::CheckSignature(), CSporkMessage::CheckSignature(), CPrivateSendQueue::CheckSignature(), CPrivateSendBroadcastTx::CheckSignature(), CPrivateSendServer::CheckTimeout(), CPrivateSendClientSession::CheckTimeout(), CGovernanceTriggerManager::CleanAndRemove(), llmq::CSigSharesManager::Cleanup(), llmq::CRecoveredSigsDb::CleanupOldRecoveredSigs(), llmq::CRecoveredSigsDb::CleanupOldVotes(), CGovernanceManager::Clear(), CNode::CloseSocketDisconnect(), CNode::CNode(), llmq::CSigningManager::CollectPendingRecoveredSigsToVerify(), llmq::CSigSharesManager::CollectSigSharesToRequest(), llmq::CSigSharesManager::CollectSigSharesToSendConcentrated(), CPrivateSendServer::CommitFinalTransaction(), CPrivateSendClientSession::CompletedTransaction(), CGovernanceManager::ConfirmInventoryRequest(), CChainState::ConnectBlock(), CConnman::ConnectNode(), ConnectSocketDirectly(), CChainState::ConnectTip(), PeerLogicValidation::ConsiderEviction(), CPrivateSendServer::ConsumeCollateral(), CPrivateSendClientSession::CreateDenominated(), CPrivateSendServer::CreateFinalTransaction(), BlockAssembler::CreateNewBlock(), CPrivateSendServer::CreateNewSession(), CSuperblock::CSuperblock(), DebugMessageHandler(), TorController::disconnected_cb(), CConnman::DisconnectNodes(), CChainState::DisconnectTip(), CPrivateSendClientSession::DoAutomaticDenominating(), CPrivateSendClientManager::DoAutomaticDenominating(), CKeePassIntegrator::doHTTPPost(), CConnman::DumpAddresses(), CConnman::DumpBanlist(), llmq::CLLMQUtils::EnsureQuorumConnections(), llmq::CQuorumManager::EnsureQuorumConnections(), EraseObjectRequest(), EraseOrphansFor(), TxConfirmStats::EstimateMedianVal(), TorControlConnection::eventcb(), PeerLogicValidation::EvictExtraOutboundPeers(), CTxMemPool::existsProviderTxConflict(), PartiallyDownloadedBlock::FillBlock(), FillBlockPayments(), PeerLogicValidation::FinalizeNode(), FindFilesToPrune(), BerkeleyEnvironment::Flush(), CBlockPolicyEstimator::FlushUnconfirmed(), GetBindAddress(), llmq::CChainLocksHandler::GetBlockTxs(), CSuperblock::GetPaymentsLimit(), llmq::CQuorumManager::GetQuorum(), CPrivateSendClientManager::GetRandomNotUsedMasternode(), CWallet::GetRealOutpointPrivateSendRounds(), CSuperblockManager::GetRequiredPaymentsString(), CSporkManager::GetSporkIDByName(), CSporkManager::GetSporkNameByID(), CSporkManager::GetSporkValue(), CSuperblockManager::GetSuperblockPayments(), gobject_submit(), CAddrMan::Good_(), llmq::CInstantSendManager::HandleFullyConfirmedBlock(), llmq::CInstantSendManager::HandleNewInputLockRecoveredSig(), llmq::CDKGSessionHandler::HandlePhase(), http_reject_request_cb(), http_request_cb(), HTTPBindAddresses(), CConnman::InactivityCheck(), PartiallyDownloadedBlock::InitData(), InitHTTPAllowList(), InitHTTPServer(), CZMQNotificationInterface::Initialize(), CZMQAbstractPublishNotifier::Initialize(), InterruptHTTPRPC(), InterruptHTTPServer(), InterruptRPC(), CPrivateSendServer::IsAcceptableDSA(), IsBlockPayeeValid(), IsBlockValueValid(), CGovernanceObject::IsCollateralValid(), CPrivateSend::IsCollateralValid(), CSuperblock::IsExpired(), CPrivateSendServer::IsInputScriptSigValid(), IsOldBudgetBlockValueValid(), CSuperblockManager::IsSuperblockTriggered(), CGovernanceVote::IsValid(), CSuperblock::IsValid(), CPrivateSendBaseSession::IsValidInOuts(), CPrivateSendClientSession::JoinExistingQueue(), LimitMempoolSize(), LimitOrphanTxSize(), CGovernanceObject::LoadData(), LoadExternalBlockFile(), CPrivateSendClientSession::MakeCollateralAmounts(), BerkeleyEnvironment::MakeMock(), CGovernanceManager::MasternodeRateCheck(), Misbehaving(), PeerLogicValidation::NewPoWValidBlock(), CZMQPublishHashBlockNotifier::NotifyBlock(), CZMQPublishRawBlockNotifier::NotifyBlock(), CZMQPublishHashChainLockNotifier::NotifyChainLock(), CZMQPublishRawChainLockNotifier::NotifyChainLock(), CZMQPublishRawChainLockSigNotifier::NotifyChainLock(), CZMQPublishHashGovernanceObjectNotifier::NotifyGovernanceObject(), CZMQPublishRawGovernanceObjectNotifier::NotifyGovernanceObject(), CZMQPublishHashGovernanceVoteNotifier::NotifyGovernanceVote(), CZMQPublishRawGovernanceVoteNotifier::NotifyGovernanceVote(), CMasternodeSync::NotifyHeaderTip(), CZMQPublishHashInstantSendDoubleSpendNotifier::NotifyInstantSendDoubleSpendAttempt(), CZMQPublishRawInstantSendDoubleSpendNotifier::NotifyInstantSendDoubleSpendAttempt(), CMNAuth::NotifyMasternodeListChanged(), CZMQPublishHashTransactionNotifier::NotifyTransaction(), CZMQPublishRawTransactionNotifier::NotifyTransaction(), CZMQPublishHashTransactionLockNotifier::NotifyTransactionLock(), CZMQPublishRawTransactionLockNotifier::NotifyTransactionLock(), CZMQPublishRawTransactionLockSigNotifier::NotifyTransactionLock(), OnRPCStopped(), CConnman::OpenNetworkConnection(), JSONRPCRequest::parse(), CSuperblock::ParsePaymentSchedule(), BerkeleyBatch::PeriodicFlush(), llmq::CDKGSessionHandler::PhaseHandlerThread(), llmq::CSigSharesManager::PreVerifyBatchedSigShares(), llmq::CSigningManager::PreVerifyRecoveredSig(), OverviewPage::privateSendStatus(), CBlockPolicyEstimator::processBlock(), CBlockPolicyEstimator::processBlockTx(), llmq::CQuorumBlockProcessor::ProcessCommitment(), ProcessGetBlockData(), ProcessGetData(), ProcessHeadersMessage(), llmq::CInstantSendManager::ProcessInstantSendLock(), llmq::CQuorumBlockProcessor::ProcessMessage(), CMNAuth::ProcessMessage(), CPrivateSendServer::ProcessMessage(), CPrivateSendClientSession::ProcessMessage(), CPrivateSendClientManager::ProcessMessage(), CGovernanceManager::ProcessMessage(), llmq::CSigSharesManager::ProcessMessage(), ProcessMessage(), llmq::CSigSharesManager::ProcessMessageBatchedSigShares(), llmq::CSigSharesManager::ProcessMessageGetSigShares(), llmq::CInstantSendManager::ProcessMessageInstantSendLock(), llmq::CSigningManager::ProcessMessageRecoveredSig(), PeerLogicValidation::ProcessMessages(), llmq::CSigSharesManager::ProcessMessageSigSesAnn(), llmq::CSigSharesManager::ProcessMessageSigShare(), llmq::CSigSharesManager::ProcessMessageSigSharesInv(), llmq::CChainLocksHandler::ProcessNewChainLock(), CPrivateSendClientSession::ProcessPendingDsaRequest(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::ProcessPendingMessageBatch(), llmq::CSigningManager::ProcessPendingRecoveredSigs(), llmq::CInstantSendManager::ProcessPendingRetryLockTxs(), llmq::CSigSharesManager::ProcessPendingSigShares(), llmq::CSigSharesManager::ProcessPendingSigSharesFromNode(), CPrivateSendClientSession::ProcessPoolStateUpdate(), ProcessSpecialTxsInBlock(), CSporkManager::ProcessSpork(), CMasternodeSync::ProcessTick(), CBlockPolicyEstimator::processTransaction(), llmq::CInstantSendManager::ProcessTx(), CGovernanceObject::ProcessVote(), CGovernanceManager::ProcessVote(), TorController::protocolinfo_cb(), pruneblockchain(), CNode::PushInventory(), CConnman::PushMessage(), CMNAuth::PushMNAUTH(), llmq::CDKGPendingMessages::PushPendingMessage(), RandAddSeedPerfmon(), TxConfirmStats::Read(), TorControlConnection::readcb(), CNode::ReceiveMsgBytes(), CConnman::RegisterEvents(), RegisterHTTPHandler(), CGovernanceVote::Relay(), CGovernanceObject::Relay(), CPrivateSendServer::RelayCompletedTransaction(), CPrivateSendServer::RelayFinalTransaction(), CPrivateSendServer::RelayStatus(), llmq::CInstantSendManager::RemoveNonLockedTx(), CTxMemPool::removeProTxConflicts(), CTxMemPool::removeProTxSpentCollateralConflicts(), TxConfirmStats::removeTx(), CGovernanceManager::RequestGovernanceObject(), CGovernanceManager::RequestGovernanceObjectVotes(), RequestObject(), CGovernanceManager::RequestOrphanObjects(), CKeePassIntegrator::rpcAssociate(), CKeePassIntegrator::rpcGetLogins(), RPCRunLater(), CKeePassIntegrator::rpcSetLogin(), CKeePassIntegrator::rpcTestAssociation(), CWallet::SelectCoinsGroupedByAddresses(), CWallet::SelectCoinsMinConf(), CWallet::SelectPSInOutPairsByDenominations(), CPrivateSendClientSession::SendDenominate(), PeerLogicValidation::SendMessages(), llmq::CSigSharesManager::SendMessages(), CGovernanceObject::SerializationOp(), CConnman::SetNetworkActive(), CPrivateSendServer::SetState(), CPrivateSendClientSession::SetState(), CConnman::SetTryNewOutboundPeer(), CZMQNotificationInterface::Shutdown(), CZMQAbstractPublishNotifier::Shutdown(), llmq::CSigSharesManager::Sign(), CPrivateSendClientSession::SignFinalTransaction(), llmq::CDKGSessionHandler::SleepBeforePhase(), CConnman::SocketHandler(), CConnman::SocketRecvData(), Socks5(), CConnman::Start(), llmq::CQuorum::StartCachePopulatorThread(), StartHTTPRPC(), StartHTTPServer(), CPrivateSendClientSession::StartNewQueue(), StartRPC(), StopHTTPRPC(), StopHTTPServer(), StopRPC(), CPrivateSendClientSession::SubmitDenominate(), CConnman::SweepBanned(), CGovernanceManager::SyncObjects(), CGovernanceManager::SyncSingleObjVotes(), ThreadHTTP(), CConnman::ThreadOpenConnections(), CConnman::ThreadOpenMasternodeConnections(), OverviewPage::togglePrivateSend(), TorController::TorController(), CTxMemPool::TrimToSize(), llmq::CSigSharesManager::TryRecoverSig(), llmq::CChainLocksHandler::TrySignChainTip(), llmq::CInstantSendManager::TrySignInstantSendLock(), CConnman::UnregisterEvents(), UnregisterHTTPHandler(), CAddrMan::Unserialize(), CGovernanceManager::UpdateCachesAndClean(), CMasternodeSync::UpdatedBlockTip(), llmq::CDKGSessionHandler::UpdatedBlockTip(), CPrivateSendClientManager::UpdatedBlockTip(), CGovernanceManager::UpdatedBlockTip(), CPrivateSend::UpdateDSTXConfirmedHeight(), llmq::CDKGSessionHandler::WaitForNewQuorum(), llmq::CDKGSessionHandler::WaitForNextPhase(), CConnman::WakeSelect(), while(), WalletBatch::ZapSelectTx(), and zmqError().
◆ LogPrintf
#define LogPrintf | ( | ... | ) |
Definition at line 203 of file util.h.
Referenced by CConnman::AcceptConnection(), llmq::CChainLocksHandler::AcceptedBlockHeader(), TorController::add_onion_cb(), CGovernanceManager::AddGovernanceObject(), CKeyHolderStorage::AddKey(), AddLocal(), CGovernanceTriggerManager::AddNewTrigger(), BlockAssembler::AddToBlock(), CWallet::AddToWallet(), CWallet::AddToWalletIfInvolvingMe(), llmq::CRecoveredSigsDb::AddVoteTimeKeys(), AppInitMain(), AppInitParameterInteraction(), AppInitSanityChecks(), llmq::CInstantSendManager::AskNodesForLockedTx(), llmq::CSigningManager::AsyncSignIfMember(), TorController::auth_cb(), TorController::authchallenge_cb(), CWallet::AutoBackupWallet(), BerkeleyDatabase::Backup(), CCoinsViewDB::BatchWrite(), CConnman::BindListenPort(), CDeterministicMNManager::BuildNewListFromBlock(), CalcCbTxMerkleRootMNList(), CDBWrapper::CDBWrapper(), CGovernancePayment::CGovernancePayment(), CWallet::ChangeWalletPassphrase(), CAddrMan::Check(), CheckForkWarningConditions(), PeerLogicValidation::CheckForStaleTipAndEvictPeers(), CGovernanceManager::CheckPostponedObjects(), CGovernanceVote::CheckSignature(), CGovernanceObject::CheckSignature(), CBloomFilter::CheckSpecialTransactionMatchesAndUpdate(), CheckSpecialTx(), CleanupBlockRevFiles(), BerkeleyEnvironment::Close(), CloseSocket(), CWallet::CommitTransaction(), CWallet::ComputeTimeSmart(), TorControlConnection::Connect(), CChainState::ConnectBlock(), TorController::connected_cb(), CConnman::ConnectNode(), ConnectSocketDirectly(), PeerLogicValidation::ConsiderEviction(), llmq::CRecoveredSigsDb::ConvertInvalidTimeKeys(), CGovernanceVoting::ConvertOutcomeToString(), CGovernanceVoting::ConvertSignalToString(), CGovernanceVoting::ConvertVoteOutcome(), CGovernanceVoting::ConvertVoteSignal(), BlockAssembler::CreateNewBlock(), CreateSocket(), CWallet::CreateTransaction(), CWallet::CreateWalletFromFile(), DebugMessageHandler(), DecryptAES256(), DeleteAuthCookie(), CConnman::DisconnectNodes(), Discover(), llmq::CChainLocksHandler::DoInvalidateBlock(), CFlatDB< T >::Dump(), DumpMempool(), EncryptAES256(), CWallet::EncryptWallet(), llmq::CChainLocksHandler::EnforceBestChainLock(), CDBWrapper::Exists(), FindBlockPos(), FindFilesToPruneManual(), FindUndoPos(), WalletBatch::FindWalletTx(), GenerateAuthCookie(), CWallet::GenerateNewHDChain(), CWalletTx::GetAmounts(), CWallet::GetBudgetSystemCollateralTX(), CCoinsViewErrorCatcher::GetCoin(), CActiveMasternodeManager::GetLocalAddress(), CWallet::GetMasternodeOutpointAndKeys(), CMasternodePayments::GetMasternodeTxOuts(), CDBTransaction< RootTransaction, RootTransaction >::GetMemoryUsage(), CWallet::GetOutpointAndKeysFromOutput(), gobject_submit(), dbwrapper_private::HandleError(), llmq::CInstantSendManager::HandleNewInstantSendLockRecoveredSig(), http_request_cb(), HTTPBindAddresses(), HTTPReq_JSONRPC(), importelectrumwallet(), importwallet(), CConnman::InactivityCheck(), CActiveMasternodeManager::Init(), InitHTTPServer(), InitLogging(), InitMessage(), llmq::CDKGSessionHandler::InitNewQuorum(), CGovernanceManager::InitOnLoad(), InitParameterInteraction(), WalletInit::InitPrivateSendSettings(), InitRPCAuthentication(), InitScriptExecutionCache(), InitSignatureCache(), instantsendtoaddress(), InterpretNegatedOption(), InterruptTorControl(), InvalidChainFound(), IsBlockPayeeValid(), IsBlockValueValid(), CGovernanceObject::IsCollateralValid(), IsInitialBlockDownload(), CSuperblockManager::IsSuperblockTriggered(), CMasternodePayments::IsTransactionValid(), CMessageHeader::IsValid(), CSuperblock::IsValid(), CKeyHolderStorage::KeepAll(), CWallet::KeepKey(), libevent_log_cb(), CFlatDB< T >::Load(), LoadBlockIndex(), LoadBlockIndexDB(), LoadChainTip(), CWallet::LoadCScript(), CGovernanceObject::LoadData(), LoadExternalBlockFile(), LoadMempool(), WalletBatch::LoadWallet(), CBitcoinLevelDBLogger::Logv(), CWallet::MarkReserveKeysAsUsed(), new_handler_terminate(), CWallet::NewKeyPool(), noui_InitMessage(), noui_ThreadSafeMessageBox(), WalletInit::Open(), BerkeleyEnvironment::Open(), OpenDiskFile(), WalletInit::ParameterInteraction(), CSuperblock::ParsePaymentSchedule(), CDeterministicMNList::PoSePunish(), PrepareShutdown(), PrintCrashInfo(), PrintExceptionContinue(), CTxMemPool::PrioritiseTransaction(), CDeterministicMNManager::ProcessBlock(), ProcessHeadersMessage(), llmq::CInstantSendManager::ProcessInstantSendLock(), CMasternodeUtils::ProcessMasternodeConnections(), CMasternodeSync::ProcessMessage(), CGovernanceManager::ProcessMessage(), ProcessMessage(), ProcessNewBlock(), llmq::CChainLocksHandler::ProcessNewChainLock(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::CSigSharesManager::ProcessPendingSigShares(), ProcessSpecialTxsInBlock(), CSporkManager::ProcessSpork(), CMasternodeSync::ProcessTick(), llmq::CInstantSendManager::ProcessTx(), CGovernanceObject::ProcessVote(), TorController::protocolinfo_cb(), RandAddSeedPerfmon(), RandFailure(), CFlatDB< T >::Read(), CBlockPolicyEstimator::Read(), TorControlConnection::readcb(), CDBWrapper::ReadDataStream(), TorController::Reconnect(), BerkeleyBatch::Recover(), WalletBatch::RecoverKeysOnlyFilter(), CWalletTx::RelayWalletTransaction(), llmq::CInstantSendManager::RemoveChainLockConflictingLock(), CGovernanceObject::RemoveInvalidVotes(), RemoveLocal(), llmq::CInstantSendManager::RemoveMempoolConflictsForLock(), RenameThread(), RenameThreadPool(), CChainState::ReplayBlocks(), CWallet::RescanFromTime(), CWallet::ResendWalletTransactions(), CWallet::ReserveKeyFromKeyPool(), llmq::CInstantSendManager::ResolveBlockConflicts(), CKeyHolderStorage::ReturnAll(), CWallet::ReturnKey(), BerkeleyBatch::Rewrite(), runCommand(), BerkeleyEnvironment::Salvage(), CWallet::ScanForWalletTransactions(), PeerLogicValidation::SendMessages(), SendRejectsAndCheckIfBanned(), CSporkManager::SetMinSporkKeys(), CSporkManager::SetPrivKey(), CSporkManager::SetSporkAddress(), Shutdown(), CGovernanceVote::Sign(), CSporkMessage::Sign(), llmq::CSigSharesManager::Sign(), CConnman::SocketEventsSelect(), CConnman::SocketRecvData(), CConnman::SocketSendData(), Socks5(), CConnman::Start(), StartHTTPServer(), StartTorControl(), CConnman::Stop(), CMasternodeSync::SwitchToNextAsset(), CGovernanceManager::SyncObjects(), CGovernanceManager::SyncSingleObjVotes(), CConnman::ThreadDNSAddressSeed(), ThreadImport(), CConnman::ThreadOpenConnections(), CWallet::TopUpKeyPool(), TorController::TorController(), TraceThread(), llmq::CSigSharesManager::TryRecoverSig(), CDeterministicMNManager::UndoBlock(), UnlinkPrunedFiles(), CCryptoKeyStore::Unlock(), CWallet::Unlock(), CGovernanceManager::UpdateCachesAndClean(), CSporkManager::UpdateSpork(), UpdateTip(), CCoinsViewDB::Upgrade(), llmq::CQuorumBlockProcessor::UpgradeDB(), CDeterministicMNManager::UpgradeDBIfNeeded(), CDeterministicMNManager::UpgradeDiff(), WalletInit::Verify(), CVerifyDB::VerifyDB(), BerkeleyBatch::VerifyEnvironment(), ArgsManager::WarnForSectionOnlyArgs(), CFlatDB< T >::Write(), CBlockPolicyEstimator::Write(), and HTTPRequest::~HTTPRequest().
Function Documentation
◆ _()
|
inline |
Translation function: Call Translate signal on UI interface, which returns a boost::optional result.
If no translation slot is registered, nothing is returned, and simply return the input.
Definition at line 92 of file util.h.
References CTranslationInterface::Translate, and translationInterface.
Referenced by AddTimeData(), AmountErrMsg(), AmountHighWarn(), AppendParamsHelpMessages(), AppInit(), AppInitMain(), AppInitParameterInteraction(), AppInitRawTx(), AppInitRPC(), AppInitSanityChecks(), CWallet::AutoBackupWallet(), CConnman::BindListenPort(), CallRPC(), CPrivateSendClientManager::CheckAutomaticBackup(), CheckDiskSpace(), CPrivateSendClientManager::CheckTimeout(), compress_big(), compress_small(), CopyrightHolders(), CWallet::CreateTransaction(), CWallet::CreateWalletFromFile(), CVerifyDB::CVerifyDB(), CPrivateSendClientSession::DoAutomaticDenominating(), CPrivateSendClientManager::DoAutomaticDenominating(), dumpwallet(), CCoinsViewErrorCatcher::GetCoin(), WalletInit::GetHelpString(), CPrivateSend::GetMessageByID(), CPrivateSendClientSession::GetStatus(), CMasternodeSync::GetSyncStatus(), GetWarnings(), HelpMessage(), HelpMessageCli(), importelectrumwallet(), importwallet(), InitRPCAuthentication(), CPrivateSendClientSession::JoinExistingQueue(), LicenseInfo(), LockDataDirectory(), noui_ThreadSafeMessageBox(), WalletInit::ParameterInteraction(), CPrivateSendClientManager::ProcessPendingDsaRequest(), CPrivateSendClientSession::ProcessPoolStateUpdate(), CChainState::ReplayBlocks(), ResolveErrMsg(), CWallet::ScanForWalletTransactions(), ShowProgress(), CConnman::Start(), CPrivateSendClientSession::StartNewQueue(), CWallet::TopUpKeyPool(), UpdateTip(), CCoinsViewDB::Upgrade(), WalletInit::Verify(), BerkeleyBatch::VerifyDatabaseFile(), CVerifyDB::VerifyDB(), and BerkeleyBatch::VerifyEnvironment().
◆ AbsPathForConfigVal()
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.
- Parameters
-
path The path to be conditionally prefixed with datadir. net_specific Forwarded to GetDataDir().
- Returns
- The normalized path.
Definition at line 1434 of file util.cpp.
References GetDataDir().
Referenced by GetAuthCookieFile(), GetConfigFile(), GetDebugLogPath(), and GetPidFile().
◆ AllocateFileRange()
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 1151 of file util.cpp.
Referenced by FindBlockPos(), and FindUndoPos().
◆ ClearDatadirCache()
void ClearDatadirCache | ( | ) |
Definition at line 968 of file util.cpp.
References csPathCached, LOCK, pathCached, and pathCachedNetSpecific.
Referenced by ArgsManager::ReadConfigFile().
◆ CopyrightHolders()
std::string CopyrightHolders | ( | const std::string & | strPrefix, |
unsigned int | nStartYear, | ||
unsigned int | nEndYear | ||
) |
Definition at line 1364 of file util.cpp.
References _(), and strprintf.
Referenced by LicenseInfo().
◆ CreatePidFile()
void CreatePidFile | ( | const fs::path & | path, |
pid_t | pid | ||
) |
Definition at line 1058 of file util.cpp.
References fsbridge::fopen().
Referenced by AppInitMain().
◆ error()
bool error | ( | const char * | fmt, |
const Args &... | args | ||
) |
Definition at line 222 of file util.h.
References LogPrintStr(), and SafeStringFormat().
Referenced by CChainState::AcceptBlock(), CChainState::AcceptBlockHeader(), AcceptToMemoryPoolWorker(), CBasicKeyStore::AddCScript(), CChainState::AddGenesisBlock(), ListCoinsTestingSetup::AddTx(), CWallet::AutoBackupWallet(), CheckBlockHeader(), CheckSequenceLocks(), CommandLineRPC(), CChainState::ConnectBlock(), CChainState::ConnectTip(), ContextualCheckBlockHeader(), CChainState::DisconnectBlock(), CChainState::DisconnectTip(), FindBlockPos(), FindDevNetGenesisBlock(), GetAddressIndex(), GetAddressUnspent(), PaymentRequestPlus::getMerchant(), CNode::GetSendVersion(), GetTimestampIndex(), GetTransaction(), GetUTXOStats(), JSONRPCError(), JSONRPCReply(), JSONRPCReplyObj(), CBlockTreeDB::LoadBlockIndexGuts(), CChainState::LoadGenesisBlock(), loadwallet(), LockDirectory(), ProcessNewBlock(), CFlatDB< T >::Read(), CBlockPolicyEstimator::Read(), CBlockTreeDB::ReadAddressIndex(), CBlockTreeDB::ReadAddressUnspentIndex(), ReadBlockFromDisk(), RegisterLoad(), CChainState::ReplayBlocks(), CChainState::RollforwardBlock(), SaveBlockToDisk(), CNode::SetAddrLocal(), CNode::SetSendVersion(), Socks5(), TestBlockValidity(), UndoSpecialTxsInBlock(), CCoinsViewDB::Upgrade(), CVerifyDB::VerifyDB(), CFlatDB< T >::Write(), WriteBlockToDisk(), and WriteUndoDataForBlock().
◆ FileCommit()
void FileCommit | ( | FILE * | file | ) |
Definition at line 1099 of file util.cpp.
Referenced by DumpMempool(), and FlushBlockFile().
◆ FormatStringFromLogArgs()
std::string FormatStringFromLogArgs | ( | const char * | fmt, |
const Args &... | args | ||
) |
◆ GetBackupsDir()
fs::path GetBackupsDir | ( | ) |
Definition at line 960 of file util.cpp.
References gArgs, ArgsManager::GetArg(), GetDataDir(), and ArgsManager::IsArgSet().
Referenced by CWallet::AutoBackupWallet(), and GUIUtil::showBackups().
◆ GetConfigFile()
fs::path GetConfigFile | ( | const std::string & | confPath | ) |
Definition at line 976 of file util.cpp.
References AbsPathForConfigVal().
Referenced by AppInitMain(), CallRPC(), GUIUtil::openConfigfile(), and ArgsManager::ReadConfigFile().
◆ GetDataDir()
const fs::path& GetDataDir | ( | bool | fNetSpecific = true | ) |
Definition at line 928 of file util.cpp.
References BaseParams(), csPathCached, CBaseChainParams::DataDir(), gArgs, ArgsManager::GetArg(), GetDefaultDataDir(), ArgsManager::IsArgSet(), LOCK, pathCached, and pathCachedNetSpecific.
Referenced by AbsPathForConfigVal(), AppInit(), AppInitMain(), AppInitRPC(), CAddrDB::CAddrDB(), CBanDB::CBanDB(), CFlatDB< T >::CFlatDB(), CheckDiskSpace(), CleanupBlockRevFiles(), ClientModel::dataDir(), DumpMempool(), GetBackupsDir(), GetBlockPosFilename(), TorController::GetPrivateKeyFile(), GetWalletDir(), llmq::InitLLMQSystem(), ipcServerName(), LoadMempool(), LockDataDirectory(), main(), GUIUtil::openDebugLogfile(), PrepareShutdown(), ArgsManager::ReadConfigFile(), OptionsModel::Reset(), RPCConsole::RPCConsole(), and ThreadImport().
◆ GetDebugLogPath()
fs::path GetDebugLogPath | ( | ) |
Definition at line 208 of file util.cpp.
References AbsPathForConfigVal(), DEFAULT_DEBUGLOGFILE, gArgs, and ArgsManager::GetArg().
Referenced by AppInitMain(), LogPrintStr(), OpenDebugLog(), and ShrinkDebugFile().
◆ GetDefaultDataDir()
fs::path GetDefaultDataDir | ( | ) |
Definition at line 898 of file util.cpp.
Referenced by AppInitMain(), GetDataDir(), and Intro::getDefaultDataDirectory().
◆ GetLogCategory()
bool GetLogCategory | ( | uint64_t * | f, |
const std::string * | str | ||
) |
Return true if str parses as a log category and set the flags in f.
Definition at line 291 of file util.cpp.
References BCLog::ALL, ARRAYLEN, BCLog::CHAINLOCKS, CLogCategoryDesc::flag, BCLog::GOBJECT, BCLog::INSTANTSEND, BCLog::KEEPASS, BCLog::LLMQ, BCLog::LLMQ_DKG, BCLog::LLMQ_SIGS, LogCategories, BCLog::MNPAYMENTS, BCLog::MNSYNC, BCLog::PRIVATESEND, and BCLog::SPORK.
Referenced by AppInitParameterInteraction(), debug(), and getCategoryMask().
◆ GetNumCores()
int GetNumCores | ( | ) |
Return the number of physical cores available on the current system.
- Note
- This does not count virtual cores, such as those provided by HyperThreading when boost is newer than 1.56.
Definition at line 1355 of file util.cpp.
Referenced by AppInitParameterInteraction(), CCheckQueueSpeed(), CCheckQueueSpeedPrevectorJob(), HelpMessage(), and OptionsDialog::OptionsDialog().
◆ GetPidFile()
fs::path GetPidFile | ( | ) |
Definition at line 1053 of file util.cpp.
References AbsPathForConfigVal(), BITCOIN_PID_FILENAME, gArgs, and ArgsManager::GetArg().
Referenced by AppInitMain(), and PrepareShutdown().
◆ GetStartupTime()
int64_t GetStartupTime | ( | ) |
Definition at line 1429 of file util.cpp.
References nStartupTime.
Referenced by ClientModel::formatClientStartupTime(), and uptime().
◆ GetThreadName()
std::string GetThreadName | ( | ) |
◆ HelpMessageGroup()
std::string HelpMessageGroup | ( | const std::string & | message | ) |
Format a string to be used as group of options in help messages.
- Parameters
-
message Group name (e.g. "RPC server options:")
- Returns
- the formatted string
Definition at line 880 of file util.cpp.
Referenced by AppendParamsHelpMessages(), AppInitRawTx(), WalletInit::GetHelpString(), HelpMessage(), HelpMessageCli(), and HelpMessageDialog::HelpMessageDialog().
◆ HelpMessageOpt()
std::string HelpMessageOpt | ( | const std::string & | option, |
const std::string & | message | ||
) |
Format a string to be used as option description in help messages.
- Parameters
-
option Option message (e.g. "-rpcuser=<user>") message Option description (e.g. "Username for JSON-RPC connections")
- Returns
- the formatted string
Definition at line 884 of file util.cpp.
References FormatParagraph(), msgIndent, optIndent, and screenWidth.
Referenced by AppendParamsHelpMessages(), AppInitRawTx(), WalletInit::GetHelpString(), HelpMessage(), HelpMessageCli(), and HelpMessageDialog::HelpMessageDialog().
◆ IntVersionToString()
std::string IntVersionToString | ( | uint32_t | nVersion | ) |
Converts version as 4-byte unsigned integer to string.
- Parameters
-
nVersion 4-byte unsigned integer, most significant byte is always 0
- Returns
- version string in "x.x.x" format (last 3 bytes as version parts) Throws std::bad_cast if format doesn match.
Definition at line 1399 of file util.cpp.
Referenced by SafeIntVersionToString().
◆ IsSwitchChar()
|
inline |
Definition at line 269 of file util.h.
Referenced by AppInit(), CommandLineRawTx(), and CommandLineRPC().
◆ ListActiveLogCategories()
std::vector<CLogCategoryActive> ListActiveLogCategories | ( | ) |
Returns a vector of the active log categories.
Definition at line 337 of file util.cpp.
References CLogCategoryActive::active, BCLog::ALL, ARRAYLEN, CLogCategoryActive::category, CLogCategoryDesc::category, LogAcceptCategory(), LogCategories, and BCLog::NONE.
Referenced by logging().
◆ ListActiveLogCategoriesString()
std::string ListActiveLogCategoriesString | ( | ) |
Returns a string with the list of active log categories.
Definition at line 352 of file util.cpp.
References BCLog::ALL, ARRAYLEN, CLogCategoryDesc::category, LogAcceptCategory(), logCategories(), LogCategories, and BCLog::NONE.
Referenced by debug().
◆ ListLogCategories()
std::string ListLogCategories | ( | ) |
Returns a string with the log categories.
Definition at line 322 of file util.cpp.
References BCLog::ALL, ARRAYLEN, CLogCategoryDesc::category, LogCategories, and BCLog::NONE.
Referenced by debug(), HelpMessage(), and logging().
◆ LockDirectory()
bool LockDirectory | ( | const fs::path & | directory, |
const std::string | lockfile_name, | ||
bool | probe_only = false |
||
) |
Definition at line 477 of file util.cpp.
References cs_dir_locks, dir_locks, error(), and fsbridge::fopen().
Referenced by LockDataDirectory(), and BerkeleyEnvironment::Open().
◆ LogAcceptCategory()
|
inlinestatic |
Definition at line 152 of file util.h.
References logCategories.
Referenced by llmq::CLLMQUtils::AddQuorumProbeConnections(), AddTimeData(), llmq::CSigSharesManager::Cleanup(), llmq::CLLMQUtils::EnsureQuorumConnections(), llmq::CInstantSendManager::HandleNewInputLockRecoveredSig(), ListActiveLogCategories(), ListActiveLogCategoriesString(), CBitcoinLevelDBLogger::Logv(), ProcessMessage(), llmq::CInstantSendManager::ProcessPendingRetryLockTxs(), CWallet::SelectCoinsGroupedByAddresses(), and CoinControlDialog::updateView().
◆ LogPrintStr()
int LogPrintStr | ( | const std::string & | str | ) |
Send a string to the log output.
Definition at line 422 of file util.cpp.
References DebugPrintInit(), debugPrintInitFlag, fileout, FileWriteStr(), fPrintToConsole, fPrintToDebugLog, fsbridge::freopen(), fReopenDebugLog(), GetDebugLogPath(), LogThreadNameStr(), LogTimestampStr(), mutexDebugLog, and vMsgsBeforeOpenLog.
Referenced by error(), and CBatchedLogger::Flush().
◆ MakeUnique()
std::unique_ptr<T> MakeUnique | ( | Args &&... | args | ) |
◆ MarkUsed() [1/2]
|
inlinestatic |
Definition at line 188 of file util.h.
Referenced by MarkUsed().
◆ MarkUsed() [2/2]
|
inlinestatic |
Definition at line 189 of file util.h.
References MarkUsed().
◆ OpenDebugLog()
bool OpenDebugLog | ( | ) |
Definition at line 214 of file util.cpp.
References DebugPrintInit(), debugPrintInitFlag, fileout, FileWriteStr(), fsbridge::fopen(), GetDebugLogPath(), mutexDebugLog, and vMsgsBeforeOpenLog.
Referenced by AppInitMain().
◆ PrintExceptionContinue()
void PrintExceptionContinue | ( | const std::exception_ptr | pex, |
const char * | pszExceptionOrigin | ||
) |
Definition at line 891 of file util.cpp.
References GetPrettyExceptionStr(), LogPrintf, and strprintf.
Referenced by AppInit(), CommandLineRawTx(), CommandLineRPC(), BitcoinCore::handleRunawayException(), main(), PeerLogicValidation::ProcessMessages(), and TraceThread().
◆ RaiseFileDescriptorLimit()
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 1128 of file util.cpp.
Referenced by AppInitParameterInteraction().
◆ ReleaseDirectoryLocks()
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 506 of file util.cpp.
References cs_dir_locks, and dir_locks.
◆ RenameOver()
bool RenameOver | ( | fs::path | src, |
fs::path | dest | ||
) |
Definition at line 1069 of file util.cpp.
Referenced by DumpMempool(), GenerateAuthCookie(), and ThreadImport().
◆ RenameThread()
void RenameThread | ( | const char * | name | ) |
Definition at line 1244 of file util.cpp.
References LogPrintf, and name.
Referenced by HTTPWorkQueueRun(), PrepareShutdown(), RenameThreadPool(), llmq::CQuorum::StartCachePopulatorThread(), ThreadHTTP(), ThreadImport(), ThreadScriptCheck(), and TraceThread().
◆ RenameThreadPool()
void RenameThreadPool | ( | ctpl::thread_pool & | tp, |
const char * | baseName | ||
) |
Definition at line 1276 of file util.cpp.
References LogPrintf, MilliSleep(), ctpl::thread_pool::push(), RenameThread(), ctpl::thread_pool::size(), and strprintf.
Referenced by CBLSWorker::Start().
◆ runCommand()
void runCommand | ( | const std::string & | strCommand | ) |
Definition at line 1236 of file util.cpp.
References LogPrintf.
Referenced by CWallet::AddToWallet(), AlertNotify(), BlockNotifyCallback(), and CWallet::NotifyTransactionLock().
◆ SafeIntVersionToString()
std::string SafeIntVersionToString | ( | uint32_t | nVersion | ) |
Copy of the IntVersionToString, that returns "Invalid version" string instead of throwing std::bad_cast.
- Parameters
-
nVersion 4-byte unsigned integer, most significant byte is always 0
- Returns
- version string in "x.x.x" format (last 3 bytes as version parts) or "Invalid version" if can't cast the given value
Definition at line 1415 of file util.cpp.
References IntVersionToString().
◆ SafeStringFormat()
std::string SafeStringFormat | ( | const std::string & | fmt, |
const Args &... | args | ||
) |
Formats a string without throwing exceptions.
Instead, it'll return an error string instead of formatted string.
Definition at line 174 of file util.h.
References tinyformat::format().
Referenced by error().
◆ SetupEnvironment()
◆ SetupNetworking()
bool SetupNetworking | ( | ) |
Definition at line 1343 of file util.cpp.
Referenced by AppInitBasicSetup(), and main().
◆ ShrinkDebugFile()
void ShrinkDebugFile | ( | ) |
Definition at line 1193 of file util.cpp.
References fsbridge::fopen(), and GetDebugLogPath().
Referenced by AppInitMain().
◆ StringVersionToInt()
uint32_t StringVersionToInt | ( | const std::string & | strVersion | ) |
◆ TraceThread()
void TraceThread | ( | const std::string | name, |
Callable | func | ||
) |
. and a wrapper that just calls func once
Definition at line 436 of file util.h.
References LogPrintf, name, PrintExceptionContinue(), and RenameThread().
Referenced by llmq::CInstantSendManager::Start(), CConnman::Start(), llmq::CDKGSessionHandler::StartThread(), StartTorControl(), and llmq::CSigSharesManager::StartWorkerThread().
◆ TruncateFile()
bool TruncateFile | ( | FILE * | file, |
unsigned int | length | ||
) |
Definition at line 1116 of file util.cpp.
Referenced by FlushBlockFile().
◆ TryCreateDirectories()
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 1085 of file util.cpp.
Referenced by CDBWrapper::CDBWrapper(), BerkeleyEnvironment::Open(), and Intro::pickDataDirectory().
Variable Documentation
◆ BITCOIN_CONF_FILENAME
const char* const BITCOIN_CONF_FILENAME |
Definition at line 104 of file util.cpp.
Referenced by AppInit(), AppInitMain(), AppInitRPC(), CallRPC(), HelpMessage(), HelpMessageCli(), main(), and GUIUtil::openConfigfile().
◆ BITCOIN_PID_FILENAME
const char* const BITCOIN_PID_FILENAME |
Definition at line 105 of file util.cpp.
Referenced by GetPidFile(), and HelpMessage().
◆ DEFAULT_DEBUGLOGFILE
const char* const DEFAULT_DEBUGLOGFILE |
Definition at line 106 of file util.cpp.
Referenced by GetDebugLogPath(), and HelpMessage().
◆ DEFAULT_LOGIPS
|
static |
Definition at line 60 of file util.h.
Referenced by HelpMessage(), and InitLogging().
◆ DEFAULT_LOGTHREADNAMES
|
static |
Definition at line 62 of file util.h.
Referenced by HelpMessage(), and InitLogging().
◆ DEFAULT_LOGTIMEMICROS
|
static |
Definition at line 59 of file util.h.
Referenced by HelpMessage(), and InitLogging().
◆ DEFAULT_LOGTIMESTAMPS
|
static |
Definition at line 61 of file util.h.
Referenced by HelpMessage(), and InitLogging().
◆ fDisableGovernance
bool fDisableGovernance |
Definition at line 94 of file util.cpp.
Referenced by AppInitMain(), AppInitParameterInteraction(), CGovernanceManager::DoMaintenance(), IsBlockPayeeValid(), IsBlockValueValid(), PrepareShutdown(), CGovernanceManager::ProcessMessage(), CMasternodeSync::ProcessTick(), BitcoinGUI::setNumBlocks(), and CDSNotificationInterface::UpdatedBlockTip().
◆ fLogIPs
bool fLogIPs |
Definition at line 115 of file util.cpp.
Referenced by CConnman::AcceptConnection(), CNode::CNode(), CConnman::ConnectNode(), CConnman::DisconnectNodes(), CNode::GetLogString(), CAddrMan::Good_(), InitLogging(), CConnman::OpenNetworkConnection(), CMasternodeUtils::ProcessMasternodeConnections(), CPrivateSendServer::ProcessMessage(), ProcessMessage(), and CConnman::ThreadOpenConnections().
◆ fLogThreadNames
bool fLogThreadNames |
Definition at line 114 of file util.cpp.
Referenced by InitLogging(), and LogThreadNameStr().
◆ fLogTimeMicros
bool fLogTimeMicros |
Definition at line 113 of file util.cpp.
Referenced by InitLogging(), and LogTimestampStr().
◆ fLogTimestamps
bool fLogTimestamps |
Definition at line 112 of file util.cpp.
Referenced by AppInitMain(), InitLogging(), and LogTimestampStr().
◆ fMasternodeMode
bool fMasternodeMode |
Definition at line 93 of file util.cpp.
Referenced by CConnman::AcceptConnection(), CPrivateSendServer::AddEntry(), CPrivateSendServer::AddUserToExistingSession(), AppInitMain(), llmq::CSigningManager::AsyncSignIfMember(), CConnman::AttemptToEvictConnection(), CalculateObjectGetDataTime(), CPrivateSendServer::ChargeFees(), CPrivateSendServer::ChargeRandomFees(), CPrivateSendServer::CheckForCompleteQueue(), CPrivateSendServer::CheckPool(), CPrivateSendServer::CheckTimeout(), CPrivateSendClientSession::CheckTimeout(), CPrivateSendClientManager::CheckTimeout(), CPrivateSendServer::CommitFinalTransaction(), CPrivateSendClientSession::CompletedTransaction(), CPrivateSendServer::CreateNewSession(), CPrivateSendClientSession::DoAutomaticDenominating(), CPrivateSendClientManager::DoAutomaticDenominating(), CPrivateSendServer::DoMaintenance(), CPrivateSendClientManager::DoMaintenance(), getprivatesendinfo(), CPrivateSendServer::HasTimedOut(), CActiveMasternodeManager::Init(), CPrivateSendServer::IsAcceptableDSA(), masternode_status(), PrepareShutdown(), OverviewPage::privateSendStatus(), CPrivateSendServer::ProcessMessage(), CPrivateSendClientSession::ProcessMessage(), CPrivateSendClientManager::ProcessMessage(), llmq::CSigSharesManager::ProcessMessage(), ProcessMessage(), CPrivateSendClientSession::ProcessPoolStateUpdate(), CMasternodeSync::ProcessTick(), llmq::CInstantSendManager::ProcessTx(), CMNAuth::PushMNAUTH(), quorum_dkgstatus(), CGovernanceManager::RequestGovernanceObjectVotes(), CWallet::SelectCoinsGroupedByAddresses(), CPrivateSendClientSession::SendDenominate(), PeerLogicValidation::SendMessages(), CPrivateSendServer::SetState(), CPrivateSendQueue::Sign(), CPrivateSendBroadcastTx::Sign(), CPrivateSendClientSession::SignFinalTransaction(), WalletInit::Start(), ThreadImport(), llmq::CChainLocksHandler::TrySignChainTip(), CActiveMasternodeManager::UpdatedBlockTip(), and CPrivateSendClientManager::UpdatedSuccessBlock().
◆ fPrintToConsole
bool fPrintToConsole |
Definition at line 109 of file util.cpp.
Referenced by InitLogging(), and LogPrintStr().
◆ fPrintToDebugLog
bool fPrintToDebugLog |
Definition at line 110 of file util.cpp.
Referenced by AppInitMain(), InitLogging(), LogPrintStr(), and main().
◆ fReopenDebugLog
std::atomic<bool> fReopenDebugLog |
Referenced by HandleSIGHUP().
◆ gArgs
ArgsManager gArgs |
Definition at line 108 of file util.cpp.
Referenced by AcceptToMemoryPoolWorker(), CChainState::ActivateBestChain(), OptionsModel::addOverriddenOption(), AddTimeData(), BlockAssembler::AddToBlock(), AddToCompactExtraTransactions(), CWallet::AddToWallet(), AdvertiseLocal(), AlertNotify(), AppInit(), AppInitBasicSetup(), AppInitMain(), AppInitParameterInteraction(), AppInitRawTx(), AppInitRPC(), AppInitServers(), TorController::auth_cb(), CConnman::Ban(), CCoinsViewDB::BatchWrite(), BitcoinGUI::BitcoinGUI(), BlockNotifyCallback(), CallRPC(), CDBWrapper::CDBWrapper(), CWallet::ChangeWalletPassphrase(), llmq::CSigningManager::Cleanup(), CommandLineRPC(), CZMQNotificationInterface::Create(), CreateBaseChainParams(), BlockAssembler::CreateNewBlock(), CWallet::CreateTransaction(), CWallet::CreateWalletFromFile(), DefaultOptions(), CWallet::EncryptWallet(), llmq::CQuorumManager::EnsureQuorumConnections(), FindDevNetGenesisBlock(), BerkeleyBatch::Flush(), FlushStateToDisk(), CWallet::GenerateNewHDChain(), GetAuthCookieFile(), GetBackupsDir(), getblockchaininfo(), GetDataDir(), GetDebugLogPath(), GUIUtil::getFont(), GetLangTerritory(), GetListenPort(), PaymentRequestPlus::getMerchant(), GetMinimumFee(), GetPidFile(), GetWalletDir(), GetWarnings(), llmq::CDKGSessionHandler::HandleDKGRound(), HelpExampleRpc(), HelpMessage(), HelpMessageDialog::HelpMessageDialog(), HTTPBindAddresses(), OptionsModel::Init(), CKeePassIntegrator::init(), CWallet::InitAutoBackup(), InitHTTPAllowList(), InitHTTPServer(), BitcoinApplication::initializeResult(), InitLogging(), InitParameterInteraction(), WalletInit::InitPrivateSendSettings(), InitRPCAuthentication(), InitScriptExecutionCache(), InitSignatureCache(), NetworkStyle::instantiate(), Intro::Intro(), IsDeprecatedRPCEnabled(), WalletModel::isWalletEnabled(), LoadBlockIndex(), GUIUtil::loadFonts(), LoadMempool(), PaymentServer::LoadRootCAs(), GUIUtil::loadStyleSheet(), WalletBatch::LoadWallet(), main(), MaybeCompactWalletDB(), mempoolInfoToJSON(), Misbehaving(), multiUserAuthorized(), CWallet::NotifyTransactionLock(), ObserveSafeMode(), WalletInit::Open(), BerkeleyEnvironment::Open(), GUIUtil::openConfigfile(), OutputTx(), WalletInit::ParameterInteraction(), Intro::pickDataDirectory(), DefaultRequestHandler::PrepareRequest(), PrepareShutdown(), CMNAuth::ProcessMessage(), ProcessMessage(), CMasternodeSync::ProcessTick(), TorController::protocolinfo_cb(), CMNAuth::PushMNAUTH(), ArgsManager::ReadConfigFile(), WalletInit::RegisterRPC(), RPCConsole::RPCConsole(), SelectBaseParams(), CWallet::SelectCoins(), OverviewPage::setBalance(), OverviewPage::setWalletModel(), CConnman::Start(), StartHTTPServer(), CConnman::ThreadDNSAddressSeed(), ThreadImport(), CConnman::ThreadOpenMasternodeConnections(), CWallet::TopUpKeyPool(), TorControlThread(), CWallet::Unlock(), UpdateMempoolForReorg(), WalletInit::Verify(), and verifychain().
◆ logCategories
std::atomic<uint64_t> logCategories |
Referenced by AppInitMain(), AppInitParameterInteraction(), debug(), InitHTTPServer(), LogAcceptCategory(), logging(), and TransactionDesc::toHTML().
◆ nWalletBackups
int nWalletBackups |
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 102 of file util.cpp.
Referenced by CWallet::AutoBackupWallet(), CPrivateSendClientManager::CheckAutomaticBackup(), OverviewPage::DisablePrivateSendCompletely(), WalletInit::GetHelpString(), CWallet::InitAutoBackup(), CWallet::KeepKey(), OverviewPage::privateSendStatus(), and CWallet::Unlock().
◆ translationInterface
CTranslationInterface translationInterface |