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