File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -328,8 +328,9 @@ class CBlockIndex
328
328
329
329
// ! Raise the validity level of this block index entry.
330
330
// ! Returns true if the validity was changed.
331
- bool RaiseValidity (enum BlockStatus nUpTo)
331
+ bool RaiseValidity (enum BlockStatus nUpTo) EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
332
332
{
333
+ AssertLockHeld (::cs_main);
333
334
assert (!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
334
335
if (nStatus & BLOCK_FAILED_MASK) return false ;
335
336
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ FUZZ_TARGET(chain)
58
58
if (block_status & ~BLOCK_VALID_MASK) {
59
59
continue ;
60
60
}
61
- ( void )disk_block_index->RaiseValidity (block_status);
61
+ WITH_LOCK (::cs_main, ( void )disk_block_index->RaiseValidity (block_status) );
62
62
}
63
63
64
64
CBlockIndex block_index{block_header};
You can’t perform that action at this time.
0 commit comments