mutex debugging routines: LocksHeld() and AssertLockHeld()

This commit is contained in:
Gavin Andresen
2013-11-29 17:25:30 +10:00
parent 207cfbfbf1
commit c649637b6c
3 changed files with 23 additions and 0 deletions

View File

@@ -2215,6 +2215,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))