aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2019-02-13 15:53:24 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2019-02-24 18:55:21 -0800
commit9b1ff5c742dec0a6e0d6aab29b0bb771ad6d8135 (patch)
tree6b3d329b0b99b1219a487d083fdd076b9725e217 /src/validation.cpp
parent241b2c74ac8c4c3000e778554da1271e3f293e5d (diff)
Call InvalidateBlock without cs_main held
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 1de2cda5cd..dd4436c9cf 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -177,7 +177,7 @@ public:
// Manual block validity manipulation:
bool PreciousBlock(CValidationState& state, const CChainParams& params, CBlockIndex* pindex) LOCKS_EXCLUDED(cs_main);
- bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindex);
void ResetBlockFailureFlags(CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
bool ReplayBlocks(const CChainParams& params, CCoinsView* view);
@@ -2789,7 +2789,7 @@ bool PreciousBlock(CValidationState& state, const CChainParams& params, CBlockIn
bool CChainState::InvalidateBlock(CValidationState& state, const CChainParams& chainparams, CBlockIndex *pindex)
{
- AssertLockHeld(cs_main);
+ LOCK(cs_main);
// We first disconnect backwards and then mark the blocks as invalid.
// This prevents a case where pruned nodes may fail to invalidateblock