diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-01-25 05:43:44 -0800 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-01-25 05:43:44 -0800 |
commit | 4c932cca6f579bfb11e0144415c3004d382b8e42 (patch) | |
tree | 6fe3978b9bac1f928fb863a44388aefe5370d539 /src/db.cpp | |
parent | b6a35d2d5235585b728c4373d6c0e69e563caec6 (diff) | |
parent | b25cc627a3a44378696bb04f1c5ee4c002963d3e (diff) |
Merge pull request #782 from sipa/checkkeys
Check consistency of private keys
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/db.cpp b/src/db.cpp index 8ca783163b..9ad05ba780 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -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 { |