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
585585 */
586586 std::vector<CAddress> GetAddr (size_t max_addresses, size_t max_pct, std::optional<Network> network)
587587 {
588+ LOCK (cs);
588589 Check ();
589590 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);
594592 Check ();
595593 return vAddr;
596594 }
@@ -714,9 +712,10 @@ class CAddrMan
714712
715713 // ! Consistency check
716714 void Check ()
715+ EXCLUSIVE_LOCKS_REQUIRED(cs)
717716 {
718717#ifdef DEBUG_ADDRMAN
719- LOCK (cs);
718+ AssertLockHeld (cs);
720719 const int err = Check_ ();
721720 if (err) {
722721 LogPrintf (" ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n " , err);
You can’t perform that action at this time.
0 commit comments