Browse Source

Merge pull request #782 from sipa/checkkeys

Check consistency of private keys
0.8
Gavin Andresen 13 years ago
parent
commit
4c932cca6f
  1. 2
      src/db.cpp

2
src/db.cpp

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

Loading…
Cancel
Save