aboutsummaryrefslogtreecommitdiff
path: root/src/primitives
diff options
context:
space:
mode:
authorBtcDrak <btcdrak@gmail.com>2016-02-19 19:52:31 +0000
committerBtcDrak <btcdrak@gmail.com>2016-03-18 08:09:06 +0000
commit12c89c918534f8e615e80381b692d89d6b09d174 (patch)
treebd6e0b0784da6ad7be58b0f01c408a2920b398f6 /src/primitives
parent02c243580295a7f1c0298fcd9afc2e76b607e724 (diff)
Policy: allow transaction version 2 relay policy.
This commit introduces a way to gracefully bump the default transaction version in a two step process.
Diffstat (limited to 'src/primitives')
-rw-r--r--src/primitives/transaction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index 07ae39e0b4..9f7d6f3943 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -206,8 +206,15 @@ private:
void UpdateHash() const;
public:
+ // Default transaction version.
static const int32_t CURRENT_VERSION=1;
+ // Changing the default transaction version requires a two step process: first
+ // adapting relay policy by bumping MAX_STANDARD_VERSION, and then later date
+ // bumping the default CURRENT_VERSION at which point both CURRENT_VERSION and
+ // MAX_STANDARD_VERSION will be equal.
+ static const int32_t MAX_STANDARD_VERSION=2;
+
// 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,