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 {