aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp11
1 files changed, 11 insertions, 0 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);