Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 1,537 Lines • ▼ Show 20 Lines | |||||
static CCheckQueue<CScriptCheck> scriptcheckqueue(128); | static CCheckQueue<CScriptCheck> scriptcheckqueue(128); | ||||
void ThreadScriptCheck() { | void ThreadScriptCheck() { | ||||
RenameThread("bitcoin-scriptch"); | RenameThread("bitcoin-scriptch"); | ||||
scriptcheckqueue.Thread(); | scriptcheckqueue.Thread(); | ||||
} | } | ||||
// Protected by cs_main | |||||
VersionBitsCache versionbitscache; | |||||
int32_t ComputeBlockVersion(const CBlockIndex *pindexPrev, | int32_t ComputeBlockVersion(const CBlockIndex *pindexPrev, | ||||
const Consensus::Params ¶ms) { | const Consensus::Params ¶ms) { | ||||
int32_t nVersion = VERSIONBITS_TOP_BITS; | int32_t nVersion = VERSIONBITS_TOP_BITS; | ||||
return nVersion; | return nVersion; | ||||
} | } | ||||
// Returns the script flags which should be checked for a given block | // Returns the script flags which should be checked for a given block | ||||
static uint32_t GetBlockScriptFlags(const Config &config, | static uint32_t GetBlockScriptFlags(const Config &config, | ||||
▲ Show 20 Lines • Show All 3,297 Lines • ▼ Show 20 Lines | void UnloadBlockIndex() { | ||||
pindexBestHeader = nullptr; | pindexBestHeader = nullptr; | ||||
g_mempool.clear(); | g_mempool.clear(); | ||||
mapBlocksUnlinked.clear(); | mapBlocksUnlinked.clear(); | ||||
vinfoBlockFile.clear(); | vinfoBlockFile.clear(); | ||||
nLastBlockFile = 0; | nLastBlockFile = 0; | ||||
nBlockSequenceId = 1; | nBlockSequenceId = 1; | ||||
setDirtyBlockIndex.clear(); | setDirtyBlockIndex.clear(); | ||||
setDirtyFileInfo.clear(); | setDirtyFileInfo.clear(); | ||||
versionbitscache.Clear(); | |||||
for (BlockMap::value_type &entry : mapBlockIndex) { | for (BlockMap::value_type &entry : mapBlockIndex) { | ||||
delete entry.second; | delete entry.second; | ||||
} | } | ||||
mapBlockIndex.clear(); | mapBlockIndex.clear(); | ||||
fHavePruned = false; | fHavePruned = false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 712 Lines • Show Last 20 Lines |