aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-06-27 12:43:19 -0400
committerLuke Dashjr <luke-jr+git@utopios.org>2012-08-26 21:02:57 +0000
commitd710ed5b637ab8a4fca433b9b6d331c1e4b97908 (patch)
tree6efd69c4c9852494f8b81338158e13f0a34b4948
parentf51b175e3c9f7326267ca0eef0dd8ae2f28b4fad (diff)
downloadbitcoin-d710ed5b637ab8a4fca433b9b6d331c1e4b97908.tar.xz
Add CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION constants.
Partial of upstream dae3e10a5abe93833c57183b7c00f1db9200f46e
-rw-r--r--src/main.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h
index 4edea5ed46..8f9e07f7a8 100644
--- a/src/main.h
+++ b/src/main.h
@@ -396,6 +396,7 @@ typedef std::map<uint256, std::pair<CTxIndex, CTransaction> > MapPrevTx;
class CTransaction
{
public:
+ static const int CURRENT_VERSION=1;
int nVersion;
std::vector<CTxIn> vin;
std::vector<CTxOut> vout;
@@ -418,7 +419,7 @@ public:
void SetNull()
{
- nVersion = 1;
+ nVersion = CTransaction::CURRENT_VERSION;
vin.clear();
vout.clear();
nLockTime = 0;
@@ -830,6 +831,7 @@ class CBlock
{
public:
// header
+ static const int CURRENT_VERSION=1;
int nVersion;
uint256 hashPrevBlock;
uint256 hashMerkleRoot;
@@ -868,7 +870,7 @@ public:
void SetNull()
{
- nVersion = 1;
+ nVersion = CBlock::CURRENT_VERSION;
hashPrevBlock = 0;
hashMerkleRoot = 0;
nTime = 0;