On Fri, Jun 6, 2014 at 10:29 AM, Wladimir <laa...@gmail.com> wrote:
> On Wed, Jun 4, 2014 at 12:42 PM, Jannis Froese
> <s9jaf...@stud.uni-saarland.de> wrote:
>> I think most concerns about the current use of asserts would be resolved
>> if the currently used asserts would be changed to a nicer definition which
>> is independent of NDEBUG, and a second class of debugging asserts would be
>> introduced, which is exclusively for expensive, redundant checks and is
>> disabled by NDEBUG.

There are a few examples of things that would classify as
expensive/redundant checks:
* addrman consistency checks (only enabled with -DDEBUG_ADDRMAN).
* mempool consistency checks (only enabled with -checkmempool).
* deadlock detection (only enabled with -DDEBUG_LOCKORDER).

I'm not sure all of these make sense to put under a single runtime
flag. For example, addrman consistency is unlikely to be affected
unless you're working on addrman code, and is pretty expensive.

Still, I do like the idea of optional consistency checks, that help
guarantee the software always has a consistency state.


Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
Bitcoin-development mailing list

Reply via email to