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

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@140 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
s_nakamoto
2010-08-19 22:43:19 +00:00
parent 44a0de1861
commit 05454818dc
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)