diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 8ded62c7d..1b144dc45 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -11,6 +11,7 @@ #include "script/script.h" #include "serialize.h" #include "uint256.h" +#include "consensus/consensus.h" #include @@ -313,6 +314,9 @@ public: static const int32_t MIN_CURRENT_VERSION = 1; static const int32_t MAX_CURRENT_VERSION = 2; + static_assert(MIN_CURRENT_VERSION >= MIN_TX_VERSION, + "standard rule for tx version should be consistent with network rule"); + // The local variables are made const to prevent unintended modification // without updating the cached hash value. However, CTransaction is not // actually immutable; deserialization and assignment are implemented,