Require CBlockIndex::IsValid() to hold cs_main

pull/826/head
Vasil Dimov 3 years ago committed by Jon Atack
parent e9f3aa5f6a
commit ca47b00577
No known key found for this signature in database
GPG Key ID: 796C4109063D4EAF

@ -311,7 +311,9 @@ public:
//! Check whether this block index entry is valid up to the passed validity level.
bool IsValid(enum BlockStatus nUpTo = BLOCK_VALID_TRANSACTIONS) const
EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
{
AssertLockHeld(::cs_main);
assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
if (nStatus & BLOCK_FAILED_MASK)
return false;

Loading…
Cancel
Save