Skip to content

Commit fae5c63

Browse files
author
MarcoFalke
committed
move-only: Move CAddrMan::Check to cpp file
This speeds up compilation of the whole program because the included header file is smaller. Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
1 parent 223ad2f commit fae5c63

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/addrman.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,17 @@ CAddrInfo CAddrMan::Select_(bool newOnly) const
743743
}
744744
}
745745

746+
void CAddrMan::Check() const
747+
{
748+
AssertLockHeld(cs);
749+
750+
const int err = Check_();
751+
if (err) {
752+
LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err);
753+
assert(false);
754+
}
755+
}
756+
746757
int CAddrMan::Check_() const
747758
{
748759
AssertLockHeld(cs);

src/addrman.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,7 @@ class CAddrMan
392392
CAddrInfo SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs);
393393

394394
//! Consistency check
395-
void Check() const EXCLUSIVE_LOCKS_REQUIRED(cs)
396-
{
397-
AssertLockHeld(cs);
398-
399-
const int err = Check_();
400-
if (err) {
401-
LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err);
402-
assert(false);
403-
}
404-
}
395+
void Check() const EXCLUSIVE_LOCKS_REQUIRED(cs);
405396

406397
//! Perform consistency check. Returns an error code or zero.
407398
int Check_() const EXCLUSIVE_LOCKS_REQUIRED(cs);

0 commit comments

Comments
 (0)