diff options
author | Jon Atack <jon@atack.com> | 2021-09-03 02:01:31 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-10-05 18:34:22 +0200 |
commit | 22b44fc696dc1078c40d17e2d497c74c7b4ae750 (patch) | |
tree | 18b7b63290bfa959e197c8ae87b58a45e6278c59 /src/addrman_impl.h | |
parent | ec65bed00ee2e403e39b3c5977caf4abd31ccc87 (diff) |
p2p: improve checkaddrman logging with duration in milliseconds
and update the function name to CheckAddrman (drop "Force") for
nicer log output as it is prefixed to each of these log messages:
2021-09-21T18:42:50Z [opencon] CheckAddrman: new 64864, tried 1690, total 66554 started
2021-09-21T18:42:50Z [opencon] CheckAddrman: completed (76.21ms)
The existing Doxygen documentation on the function already makes
clear that it is unaffected by m_consistency_check_ratio.
Diffstat (limited to 'src/addrman_impl.h')
-rw-r--r-- | src/addrman_impl.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/addrman_impl.h b/src/addrman_impl.h index 1dc7f25f9c..5bab8bc0e8 100644 --- a/src/addrman_impl.h +++ b/src/addrman_impl.h @@ -6,6 +6,7 @@ #define BITCOIN_ADDRMAN_IMPL_H #include <logging.h> +#include <logging/timer.h> #include <netaddress.h> #include <protocol.h> #include <serialize.h> @@ -260,12 +261,13 @@ private: std::pair<CAddress, int64_t> SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs); - //! Consistency check, taking into account m_consistency_check_ratio. Will std::abort if an inconsistency is detected. + //! Consistency check, taking into account m_consistency_check_ratio. + //! Will std::abort if an inconsistency is detected. void Check() const EXCLUSIVE_LOCKS_REQUIRED(cs); //! Perform consistency check, regardless of m_consistency_check_ratio. //! @returns an error code or zero. - int ForceCheckAddrman() const EXCLUSIVE_LOCKS_REQUIRED(cs); + int CheckAddrman() const EXCLUSIVE_LOCKS_REQUIRED(cs); }; #endif // BITCOIN_ADDRMAN_IMPL_H |