Make nTimeBestReceived atomic

zcash: cherry picked from commit d8f2b8a8c032b83a3bd90750e58abaeece7e34e7
zcash: https://github.com/bitcoin/bitcoin/pull/9708
This commit is contained in:
Matt Corallo 2017-02-06 17:38:57 -05:00 committed by Jack Grigg
parent 78e0b89750
commit e6eac19062
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ CCriticalSection cs_main;
BlockMap mapBlockIndex;
CChain chainActive;
CBlockIndex *pindexBestHeader = NULL;
static int64_t nTimeBestReceived = 0;
static std::atomic<int64_t> nTimeBestReceived(0); // Used only to inform the wallet of when we last received a block
CWaitableCriticalSection csBestBlock;
CConditionVariable cvBlockChange;
int nScriptCheckThreads = 0;