Static assertion that standard and network min tx versions are consistent.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#include "script/script.h"
|
#include "script/script.h"
|
||||||
#include "serialize.h"
|
#include "serialize.h"
|
||||||
#include "uint256.h"
|
#include "uint256.h"
|
||||||
|
#include "consensus/consensus.h"
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
|
|
||||||
@@ -313,6 +314,9 @@ public:
|
|||||||
static const int32_t MIN_CURRENT_VERSION = 1;
|
static const int32_t MIN_CURRENT_VERSION = 1;
|
||||||
static const int32_t MAX_CURRENT_VERSION = 2;
|
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
|
// The local variables are made const to prevent unintended modification
|
||||||
// without updating the cached hash value. However, CTransaction is not
|
// without updating the cached hash value. However, CTransaction is not
|
||||||
// actually immutable; deserialization and assignment are implemented,
|
// actually immutable; deserialization and assignment are implemented,
|
||||||
|
|||||||
Reference in New Issue
Block a user