The --enable-debug
flag should default to enabling debug consistency checks. This PR enables addrman and mempool consistency checks at a rate of once per 1000 operations, by default when running in debug mode.
To opt out of the checks when running a debug build specify the runtime -checkmempool=0
and -checkaddrman=0
debug options, as described in developer-notes.md
On my machine, configuring these checks to run every 1000 operations saw them run no more than once per minute (and often much less frequently), which did not introduce any significant overhead.
This PR does not include a -checkblockindex
default consistency check for mainnet when running in debug mode.
fixes #24709