On Wed, Jun 4, 2014 at 12:42 PM, Jannis Froese < s9jafroe@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. > Also, most assertion errors that happen to people running Bitcoin Core are not caused by software bugs but database corruption errors (usually due to unclean shutdown). For example in case we detect missing/truncated block files or UTXO db consistency we should, instead of raising an assertion error, propose a -reindex - see also https://github.com/bitcoin/bitcoin/issues/2202 . So instead of using assertions we need a fatal error function for those problems which are probably recoverable in a certain specific way. In principle starting a reindex wouldn't even need to take down the entire process (though that's easier for implementation due to cleanup and assumptions made). Wladimir