Skip to content

Commit 1609809

Browse files
validation: Hold cs_main when reading chainActive in RewindBlockIndex
1 parent e79bbb7 commit 1609809

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/validation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4316,6 +4316,7 @@ bool RewindBlockIndex(const CChainParams& params) {
43164316
return false;
43174317
}
43184318

4319+
LOCK(cs_main);
43194320
if (::ChainActive().Tip() != nullptr) {
43204321
// FlushStateToDisk can possibly read ::ChainActive(). Be conservative
43214322
// and skip it here, we're about to -reindex-chainstate anyway, so

0 commit comments

Comments
 (0)