Merge pull request #782 from sipa/checkkeys

Check consistency of private keys
This commit is contained in:
Gavin Andresen 2012-01-25 05:43:44 -08:00
commit 4c932cca6f

View File

@ -862,6 +862,8 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
ssValue >> pkey;
key.SetPubKey(vchPubKey);
key.SetPrivKey(pkey);
if (key.GetPubKey() != vchPubKey)
return DB_CORRUPT;
}
else
{