From fae5c633dc05a045aaac370b383e4799cb0e0590 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 18 Aug 2021 09:07:18 +0200 Subject: 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 --- src/addrman.cpp | 11 +++++++++++ src/addrman.h | 11 +---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src') 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); -- cgit v1.2.3