mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Check consistency of private keys
Reported by onlineproof on IRC: Bitcoin does not verify whether private keys and public keys correspond, when loading a wallet.
This commit is contained in:
parent
1240a1b0a8
commit
b25cc627a3
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user