Browse Source

Static assertion that standard and network min tx versions are consistent.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
pull/4/head
Daira Hopwood 8 years ago
parent
commit
a5fd8da7ba
  1. 4
      src/primitives/transaction.h

4
src/primitives/transaction.h

@ -11,6 +11,7 @@
#include "script/script.h"
#include "serialize.h"
#include "uint256.h"
#include "consensus/consensus.h"
#include <boost/array.hpp>
@ -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,

Loading…
Cancel
Save