Skip to content

Commit b39a07d

Browse files
committed
Add missing AssertLockHeld in ConnectBlock
1 parent 41106a5 commit b39a07d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,7 @@ void ThreadScriptCheck() {
17271727

17281728
bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck)
17291729
{
1730+
AssertLockHeld(cs_main);
17301731
// Check it again in case a previous version let a bad block in
17311732
if (!CheckBlock(block, state, !fJustCheck, !fJustCheck))
17321733
return false;

0 commit comments

Comments
 (0)