diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-05-12 21:48:40 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-05-15 14:58:15 +0200 |
commit | 1609809fb2a4c2ec15b7c26dc328e2e666bd5d57 (patch) | |
tree | 2f37c3d8933199832c02931ecbfaccf8213e8097 /src | |
parent | e79bbb73e08e3f191e97d3b67a2fbb510c5545ff (diff) | |
download | bitcoin-1609809fb2a4c2ec15b7c26dc328e2e666bd5d57.tar.xz |
validation: Hold cs_main when reading chainActive in RewindBlockIndex
Diffstat (limited to 'src')
-rw-r--r-- | src/validation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index b71e8daf97..3ae2292c3b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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 |