mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
Merge branch '0.4.x' into 0.5.0.x
This commit is contained in:
14
src/db.cpp
14
src/db.cpp
@@ -777,6 +777,13 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
|
||||
//// todo: shouldn't we catch exceptions and try to recover and continue?
|
||||
CRITICAL_BLOCK(pwallet->cs_wallet)
|
||||
{
|
||||
int nMinVersion = 0;
|
||||
if (Read((string)"minversion", nMinVersion))
|
||||
{
|
||||
if (nMinVersion > VERSION)
|
||||
return DB_TOO_NEW;
|
||||
}
|
||||
|
||||
// Get cursor
|
||||
Dbc* pcursor = GetCursor();
|
||||
if (!pcursor)
|
||||
@@ -962,13 +969,6 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
|
||||
if (strKey == "addrProxy") ssValue >> addrProxy;
|
||||
if (fHaveUPnP && strKey == "fUseUPnP") ssValue >> fUseUPnP;
|
||||
}
|
||||
else if (strType == "minversion")
|
||||
{
|
||||
int nMinVersion = 0;
|
||||
ssValue >> nMinVersion;
|
||||
if (nMinVersion > VERSION)
|
||||
return DB_TOO_NEW;
|
||||
}
|
||||
}
|
||||
pcursor->close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user