move-only: Move NDEBUG compile time check to util/check

This commit is contained in:
MarcoFalke 2020-06-08 08:54:23 -04:00
parent eac65d99dd
commit fa457fbd33
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548
3 changed files with 9 additions and 11 deletions

View File

@ -13,10 +13,9 @@
#include <consensus/validation.h>
#include <hash.h>
#include <index/blockfilterindex.h>
#include <validation.h>
#include <merkleblock.h>
#include <netmessagemaker.h>
#include <netbase.h>
#include <netmessagemaker.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <primitives/block.h>
@ -26,16 +25,14 @@
#include <scheduler.h>
#include <tinyformat.h>
#include <txmempool.h>
#include <util/system.h>
#include <util/check.h> // For NDEBUG compile time check
#include <util/strencodings.h>
#include <util/system.h>
#include <validation.h>
#include <memory>
#include <typeinfo>
#if defined(NDEBUG)
# error "Bitcoin cannot be compiled without assertions."
#endif
/** Expiration time for orphan transactions in seconds */
static constexpr int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
/** Minimum time between orphan transactions expire time checks in seconds */

View File

@ -42,4 +42,8 @@ class NonFatalCheckError : public std::runtime_error
} \
} while (false)
#if defined(NDEBUG)
#error "Cannot compile without assertions!"
#endif
#endif // BITCOIN_UTIL_CHECK_H

View File

@ -39,6 +39,7 @@
#include <ui_interface.h>
#include <uint256.h>
#include <undo.h>
#include <util/check.h> // For NDEBUG compile time check
#include <util/moneystr.h>
#include <util/rbf.h>
#include <util/strencodings.h>
@ -51,10 +52,6 @@
#include <boost/algorithm/string/replace.hpp>
#if defined(NDEBUG)
# error "Bitcoin cannot be compiled without assertions."
#endif
#define MICRO 0.000001
#define MILLI 0.001