This is an alternative to #11694.
It reintroduces a uint256 variable with the best block hash, protected by csBestBlock, and only updated while holding it.
Also rename the involved variable to modern guidelines, as there are very few uses.
162@@ -163,8 +163,9 @@ extern BlockMap& mapBlockIndex;
163 extern uint64_t nLastBlockTx;
164 extern uint64_t nLastBlockWeight;
165 extern const std::string strMessageMagic;
166-extern CWaitableCriticalSection csBestBlock;
167-extern CConditionVariable cvBlockChange;
168+extern CWaitableCriticalSection cs_best_block;
169+extern CConditionVariable cv_best_block_change;
170+extern uint256 best_block_hash;
g_
. (I would probably call these g_best_block
g_best_block_mutex
g_best_block_cv
.)
utACK 4a6c0e3dcfdca98270cb96b73db4c3d4446dba50
Travis timeout. Kicking.