mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
validation: Hold cs_main when reading chainActive in RewindBlockIndex
This commit is contained in:
@@ -4316,6 +4316,7 @@ bool RewindBlockIndex(const CChainParams& params) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LOCK(cs_main);
|
||||
if (::ChainActive().Tip() != nullptr) {
|
||||
// FlushStateToDisk can possibly read ::ChainActive(). Be conservative
|
||||
// and skip it here, we're about to -reindex-chainstate anyway, so
|
||||
|
||||
Reference in New Issue
Block a user