|
|
@ -210,6 +210,7 @@ CChain& chainActive = g_chainstate.chainActive; |
|
|
|
CBlockIndex *pindexBestHeader = nullptr; |
|
|
|
CBlockIndex *pindexBestHeader = nullptr; |
|
|
|
CWaitableCriticalSection csBestBlock; |
|
|
|
CWaitableCriticalSection csBestBlock; |
|
|
|
CConditionVariable cvBlockChange; |
|
|
|
CConditionVariable cvBlockChange; |
|
|
|
|
|
|
|
uint256 hashBestBlock; |
|
|
|
int nScriptCheckThreads = 0; |
|
|
|
int nScriptCheckThreads = 0; |
|
|
|
std::atomic_bool fImporting(false); |
|
|
|
std::atomic_bool fImporting(false); |
|
|
|
std::atomic_bool fReindex(false); |
|
|
|
std::atomic_bool fReindex(false); |
|
|
@ -2151,7 +2152,11 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar |
|
|
|
// New best block
|
|
|
|
// New best block
|
|
|
|
mempool.AddTransactionsUpdated(1); |
|
|
|
mempool.AddTransactionsUpdated(1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
WaitableLock lock(csBestBlock); |
|
|
|
|
|
|
|
hashBestBlock = pindexNew->GetBlockHash(); |
|
|
|
cvBlockChange.notify_all(); |
|
|
|
cvBlockChange.notify_all(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::vector<std::string> warningMessages; |
|
|
|
std::vector<std::string> warningMessages; |
|
|
|
if (!IsInitialBlockDownload()) |
|
|
|
if (!IsInitialBlockDownload()) |
|
|
|