aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp2
-rw-r--r--src/main.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c30a2ecd4b..b1a40604da 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1903,7 +1903,7 @@ FILE* AppendBlockFile(unsigned int& nFileRet)
if (fseek(file, 0, SEEK_END) != 0)
return NULL;
// FAT32 file size max 4GB, fseek and ftell max 2GB, so we must stay under 2GB
- if (ftell(file) < 0x7F000000 - MAX_SIZE)
+ if (ftell(file) < (long)(0x7F000000 - MAX_SIZE))
{
nFileRet = nCurrentBlockFile;
return file;
diff --git a/src/main.h b/src/main.h
index fa4db67ac8..50a4aa7a4f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -393,6 +393,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;
@@ -828,6 +829,7 @@ class CBlock
{
public:
// header
+ static const int CURRENT_VERSION=1;
int nVersion;
uint256 hashPrevBlock;
uint256 hashMerkleRoot;
@@ -869,7 +871,7 @@ public:
void SetNull()
{
- nVersion = 1;
+ nVersion = CBlock::CURRENT_VERSION;
hashPrevBlock = 0;
hashMerkleRoot = 0;
nTime = 0;