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.
This commit is contained in:
Jon Atack committed 2021-10-05 18:34:22 +02:00
1 parent ec65bed00e
commit 22b44fc696
4 files changed
+15 -11

No files matched your search

+2 -2
View File
@@ -89,8 +89,8 @@ class AsmapTest(BitcoinTestFramework):
self.restart_node(0, ["-asmap", "-checkaddrman=1"])
with self.node.assert_debug_log(
expected_msgs=[
"Addrman checks started: new 1, tried 1, total 2",
"Addrman checks completed successfully",
"CheckAddrman: new 1, tried 1, total 2 started",
"CheckAddrman: completed",
]
):
self.node.getnodeaddresses() # getnodeaddresses re-runs the addrman checks