File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -585,12 +585,10 @@ class CAddrMan
585
585
*/
586
586
std::vector<CAddress> GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network)
587
587
{
588
+ LOCK (cs);
588
589
Check ();
589
590
std::vector<CAddress> vAddr;
590
- {
591
- LOCK (cs);
592
- GetAddr_ (vAddr, max_addresses, max_pct, network);
593
- }
591
+ GetAddr_ (vAddr, max_addresses, max_pct, network);
594
592
Check ();
595
593
return vAddr;
596
594
}
@@ -714,9 +712,10 @@ class CAddrMan
714
712
715
713
// ! Consistency check
716
714
void Check ()
715
+ EXCLUSIVE_LOCKS_REQUIRED(cs)
717
716
{
718
717
#ifdef DEBUG_ADDRMAN
719
- LOCK (cs);
718
+ AssertLockHeld (cs);
720
719
const int err = Check_ ();
721
720
if (err) {
722
721
LogPrintf (" ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n " , err);
You can’t perform that action at this time.
0 commit comments