diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-16 16:26:14 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-12-19 10:24:23 -0500 |
commit | f8ded588a2f78ac2767a60c716a7d15c273b4fc7 (patch) | |
tree | f8bb01303f5feb0bf04a8fb01ada04b58304a207 /src/db.cpp | |
parent | 8896c2d9d64d71e25b31d7a389f0b8db49a1e50a (diff) |
Implement BIP 14 : separate protocol version from client version
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/db.cpp b/src/db.cpp index 9ac93b3506..696fc736e0 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -131,7 +131,7 @@ CDB::CDB(const char* pszFile, const char* pszMode) : pdb(NULL) { bool fTmp = fReadOnly; fReadOnly = false; - WriteVersion(VERSION); + WriteVersion(CLIENT_VERSION); fReadOnly = fTmp; } @@ -236,7 +236,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip) { // Update version: ssValue.clear(); - ssValue << VERSION; + ssValue << CLIENT_VERSION; } Dbt datKey(&ssKey[0], ssKey.size()); Dbt datValue(&ssValue[0], ssValue.size()); @@ -931,7 +931,7 @@ int CWalletDB::LoadWallet(CWallet* pwallet) { int nMinVersion = 0; ssValue >> nMinVersion; - if (nMinVersion > VERSION) + if (nMinVersion > CLIENT_VERSION) return DB_TOO_NEW; } } @@ -956,13 +956,13 @@ int CWalletDB::LoadWallet(CWallet* pwallet) if (fIsEncrypted && (nFileVersion == 40000 || nFileVersion == 50000)) return DB_NEED_REWRITE; - if (nFileVersion < VERSION) // Update + if (nFileVersion < CLIENT_VERSION) // Update { // Get rid of old debug.log file in current directory if (nFileVersion <= 105 && !pszSetDataDir[0]) unlink("debug.log"); - WriteVersion(VERSION); + WriteVersion(CLIENT_VERSION); } return DB_LOAD_OK; |