Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
BlockMap mapBlockIndex; | BlockMap mapBlockIndex; | ||||
CChain chainActive; | CChain chainActive; | ||||
CBlockIndex *pindexBestHeader = nullptr; | CBlockIndex *pindexBestHeader = nullptr; | ||||
CWaitableCriticalSection g_best_block_mutex; | CWaitableCriticalSection g_best_block_mutex; | ||||
CConditionVariable g_best_block_cv; | CConditionVariable g_best_block_cv; | ||||
uint256 g_best_block; | uint256 g_best_block; | ||||
int nScriptCheckThreads = 0; | int nScriptCheckThreads = 0; | ||||
std::atomic_bool fImporting(false); | std::atomic_bool fImporting(false); | ||||
bool fReindex = false; | std::atomic_bool fReindex(false); | ||||
bool fTxIndex = false; | bool fTxIndex = false; | ||||
bool fHavePruned = false; | bool fHavePruned = false; | ||||
bool fPruneMode = false; | bool fPruneMode = false; | ||||
bool fIsBareMultisigStd = DEFAULT_PERMIT_BAREMULTISIG; | bool fIsBareMultisigStd = DEFAULT_PERMIT_BAREMULTISIG; | ||||
bool fRequireStandard = true; | bool fRequireStandard = true; | ||||
bool fCheckBlockIndex = false; | bool fCheckBlockIndex = false; | ||||
bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED; | bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED; | ||||
size_t nCoinCacheUsage = 5000 * 300; | size_t nCoinCacheUsage = 5000 * 300; | ||||
▲ Show 20 Lines • Show All 4,280 Lines • ▼ Show 20 Lines | static bool LoadBlockIndexDB(const Config &config) { | ||||
if (fHavePruned) { | if (fHavePruned) { | ||||
LogPrintf( | LogPrintf( | ||||
"LoadBlockIndexDB(): Block files have previously been pruned\n"); | "LoadBlockIndexDB(): Block files have previously been pruned\n"); | ||||
} | } | ||||
// Check whether we need to continue reindexing | // Check whether we need to continue reindexing | ||||
bool fReindexing = false; | bool fReindexing = false; | ||||
pblocktree->ReadReindexing(fReindexing); | pblocktree->ReadReindexing(fReindexing); | ||||
fReindex |= fReindexing; | if (fReindexing) { | ||||
fReindex = true; | |||||
} | |||||
// Check whether we have a transaction index | // Check whether we have a transaction index | ||||
pblocktree->ReadFlag("txindex", fTxIndex); | pblocktree->ReadFlag("txindex", fTxIndex); | ||||
LogPrintf("%s: transaction index %s\n", __func__, | LogPrintf("%s: transaction index %s\n", __func__, | ||||
fTxIndex ? "enabled" : "disabled"); | fTxIndex ? "enabled" : "disabled"); | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,131 Lines • Show Last 20 Lines |