# error "Bitcoin cannot be compiled without assertions." <<<<NOT



Summary:

In a discussion between Wladimir and Jannis Froese, concerns were raised regarding the current use of asserts. Jannis suggested that if currently used asserts were changed to a nicer definition that is independent of NDEBUG and a second class of debugging asserts was introduced exclusively for expensive, redundant checks and disabled by NDEBUG, most concerns would be resolved. A few examples of things that would classify as expensive/redundant checks include addrman consistency checks, mempool consistency checks, and deadlock detection. However, it is unlikely that all of these make sense to put under a single runtime flag as addrman consistency is only affected when working on addrman code and is pretty expensive. Despite this, the idea of optional consistency checks was generally well-liked as they help guarantee the software always has a consistency state.


Updated on: 2023-05-19T18:57:59.059607+00:00