Add missing const to CAddrMan::Check_()

Also: Always compile the function signature to avoid similar issues in
the future.
This commit is contained in:
MarcoFalke
2021-08-02 13:42:42 +02:00
committed by John Newbery
parent d67330d112
commit ee458d84fc
2 changed files with 14 additions and 11 deletions

View File

@@ -738,19 +738,15 @@ private:
void Check() const
EXCLUSIVE_LOCKS_REQUIRED(cs)
{
#ifdef DEBUG_ADDRMAN
AssertLockHeld(cs);
const int err = Check_();
if (err) {
LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err);
}
#endif
}
#ifdef DEBUG_ADDRMAN
//! Perform consistency check. Returns an error code or zero.
int Check_() const EXCLUSIVE_LOCKS_REQUIRED(cs);
#endif
/**
* Return all or many randomly selected addresses, optionally by network.