block index checking on load, extra redundant checks, misc refactoring

This commit is contained in:
Satoshi Nakamoto
2010-08-28 00:49:30 +00:00
committed by Gavin Andresen
parent 43deefa435
commit 7a37c906a1
5 changed files with 126 additions and 62 deletions

View File

@@ -20,7 +20,7 @@ class CDataStream;
class CAutoFile;
static const int VERSION = 310;
static const char* pszSubVer = ".3";
static const char* pszSubVer = ".4";
@@ -81,6 +81,13 @@ enum
#define READWRITE(obj) (nSerSize += ::SerReadWrite(s, (obj), nType, nVersion, ser_action))
#define READWRITEVER(obj) \
do { \
READWRITE((obj)); \
if ((obj) == 10300) \
(obj) = 300; \
} while (false)