aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-01-25 05:43:44 -0800
committerGavin Andresen <gavinandresen@gmail.com>2012-01-25 05:43:44 -0800
commit4c932cca6f579bfb11e0144415c3004d382b8e42 (patch)
tree6fe3978b9bac1f928fb863a44388aefe5370d539 /src/db.cpp
parentb6a35d2d5235585b728c4373d6c0e69e563caec6 (diff)
parentb25cc627a3a44378696bb04f1c5ee4c002963d3e (diff)
Merge pull request #782 from sipa/checkkeys
Check consistency of private keys
Diffstat (limited to 'src/db.cpp')
-rw-r--r--src/db.cpp2
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
{