Merge branch '0.4.x' into 0.5.0.x

Conflicts:
	src/main.cpp
This commit is contained in:
Luke Dashjr
2012-02-02 20:17:41 -05:00
6 changed files with 94 additions and 23 deletions

View File

@@ -861,12 +861,16 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
CPrivKey pkey;
ssValue >> pkey;
key.SetPrivKey(pkey);
if (key.GetPubKey() != vchPubKey || !key.IsValid())
return DB_CORRUPT;
}
else
{
CWalletKey wkey;
ssValue >> wkey;
key.SetPrivKey(wkey.vchPrivKey);
if (key.GetPubKey() != vchPubKey || !key.IsValid())
return DB_CORRUPT;
}
if (!pwallet->LoadKey(key))
return DB_CORRUPT;