Merge pull request #3329 from gavinandresen/syncdebug

mutex debugging routines: LocksHeld() and AssertLockHeld()
This commit is contained in:
Gavin Andresen
2013-12-01 17:43:37 -08:00
3 changed files with 23 additions and 0 deletions

View File

@@ -2176,6 +2176,8 @@ void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd)
bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp)
{
AssertLockHeld("cs_main");
// Check for duplicate
uint256 hash = pblock->GetHash();
if (mapBlockIndex.count(hash))