mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge branch 'checkkeys' of https://github.com/sipa/bitcoin
This commit is contained in:
commit
4477b17f15
@ -862,7 +862,7 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
|
||||
ssValue >> pkey;
|
||||
key.SetPubKey(vchPubKey);
|
||||
key.SetPrivKey(pkey);
|
||||
if (key.GetPubKey() != vchPubKey)
|
||||
if (key.GetPubKey() != vchPubKey || !key.IsValid())
|
||||
return DB_CORRUPT;
|
||||
}
|
||||
else
|
||||
@ -871,6 +871,8 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
|
||||
ssValue >> wkey;
|
||||
key.SetPubKey(vchPubKey);
|
||||
key.SetPrivKey(wkey.vchPrivKey);
|
||||
if (key.GetPubKey() != vchPubKey || !key.IsValid())
|
||||
return DB_CORRUPT;
|
||||
}
|
||||
if (!pwallet->LoadKey(key))
|
||||
return DB_CORRUPT;
|
||||
|
Loading…
Reference in New Issue
Block a user