From b39a07dc42ab6ba746a25206969fb81913146f1f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 23 Apr 2014 08:55:24 +0200 Subject: [PATCH] Add missing AssertLockHeld in ConnectBlock --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index 0bbe833705..a591168c07 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1727,6 +1727,7 @@ void ThreadScriptCheck() { bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck) { + AssertLockHeld(cs_main); // Check it again in case a previous version let a bad block in if (!CheckBlock(block, state, !fJustCheck, !fJustCheck)) return false;