diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-05-22 08:17:46 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-05-22 08:17:48 -0400 |
commit | 1c177c3a004f91eca743bb3a0dd9534a544026d5 (patch) | |
tree | a5e92da9af19d0757d4298145cb6b721ff7711d9 /src | |
parent | 953f75767727f26fad72ee5a16083938ff09fd73 (diff) | |
parent | 1609809fb2a4c2ec15b7c26dc328e2e666bd5d57 (diff) |
Merge #16015: validation: Hold cs_main when reading chainActive in RewindBlockIndex
1609809fb2 validation: Hold cs_main when reading chainActive in RewindBlockIndex (practicalswift)
Pull request description:
Fixes #15980.
Hold `cs_main` when reading `chainActive` (via `::ChainActive()`) in `RewindBlockIndex`.
ACKs for commit 160980:
MarcoFalke:
utACK 1609809fb2a4c2ec15b7c26dc328e2e666bd5d57
Tree-SHA512: 54f180ab391f92f04950735c2bb337f0b7495826d2096f7a0f9a2da50bc29d08747f404a0495e33ca4edd4c842efbab4c4730d5e1a8b9da3e1249cf884268f4b
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 4347e0b0cc..436c62261b 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4307,6 +4307,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 |