aboutsummaryrefslogtreecommitdiff
path: root/serialize.h
diff options
context:
space:
mode:
Diffstat (limited to 'serialize.h')
-rw-r--r--serialize.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/serialize.h b/serialize.h
index 2cc9ab3148..d1dcea218d 100644
--- a/serialize.h
+++ b/serialize.h
@@ -19,8 +19,11 @@ class CScript;
class CDataStream;
class CAutoFile;
-static const int VERSION = 310;
-static const char* pszSubVer = ".5";
+static const unsigned int MAX_SIZE = 0x02000000;
+
+static const int VERSION = 311;
+static const char* pszSubVer = ".0";
+
@@ -224,7 +227,7 @@ uint64 ReadCompactSize(Stream& is)
READDATA(is, nSize);
nSizeRet = nSize;
}
- if (nSizeRet > (uint64)INT_MAX)
+ if (nSizeRet > (uint64)MAX_SIZE)
throw std::ios_base::failure("ReadCompactSize() : size too large");
return nSizeRet;
}