aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-08-18 09:07:18 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-09-21 10:07:38 +0200
commitfae5c633dc05a045aaac370b383e4799cb0e0590 (patch)
treef165c299d76113d6742f31f0f1c02dabf88c9b66
parent223ad2fd0d355a9caf3c12fe2a286030d7f3190f (diff)
downloadbitcoin-fae5c633dc05a045aaac370b383e4799cb0e0590.tar.xz
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
-rw-r--r--src/addrman.cpp11
-rw-r--r--src/addrman.h11
2 files changed, 12 insertions, 10 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index a1e8cb1bf1..e3f370134f 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -743,6 +743,17 @@ CAddrInfo CAddrMan::Select_(bool newOnly) const
}
}
+void CAddrMan::Check() const
+{
+ AssertLockHeld(cs);
+
+ const int err = Check_();
+ if (err) {
+ LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err);
+ assert(false);
+ }
+}
+
int CAddrMan::Check_() const
{
AssertLockHeld(cs);
diff --git a/src/addrman.h b/src/addrman.h
index 0885231ebc..ca291d60ab 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -392,16 +392,7 @@ private:
CAddrInfo SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs);
//! Consistency check
- void Check() const EXCLUSIVE_LOCKS_REQUIRED(cs)
- {
- AssertLockHeld(cs);
-
- const int err = Check_();
- if (err) {
- LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err);
- assert(false);
- }
- }
+ void Check() const EXCLUSIVE_LOCKS_REQUIRED(cs);
//! Perform consistency check. Returns an error code or zero.
int Check_() const EXCLUSIVE_LOCKS_REQUIRED(cs);