|
|
@ -862,7 +862,7 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
|
|
|
|
ssValue >> pkey;
|
|
|
|
ssValue >> pkey;
|
|
|
|
key.SetPubKey(vchPubKey);
|
|
|
|
key.SetPubKey(vchPubKey);
|
|
|
|
key.SetPrivKey(pkey);
|
|
|
|
key.SetPrivKey(pkey);
|
|
|
|
if (key.GetPubKey() != vchPubKey)
|
|
|
|
if (key.GetPubKey() != vchPubKey || !key.IsValid())
|
|
|
|
return DB_CORRUPT;
|
|
|
|
return DB_CORRUPT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -871,6 +871,8 @@ int CWalletDB::LoadWallet(CWallet* pwallet)
|
|
|
|
ssValue >> wkey;
|
|
|
|
ssValue >> wkey;
|
|
|
|
key.SetPubKey(vchPubKey);
|
|
|
|
key.SetPubKey(vchPubKey);
|
|
|
|
key.SetPrivKey(wkey.vchPrivKey);
|
|
|
|
key.SetPrivKey(wkey.vchPrivKey);
|
|
|
|
|
|
|
|
if (key.GetPubKey() != vchPubKey || !key.IsValid())
|
|
|
|
|
|
|
|
return DB_CORRUPT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!pwallet->LoadKey(key))
|
|
|
|
if (!pwallet->LoadKey(key))
|
|
|
|
return DB_CORRUPT;
|
|
|
|
return DB_CORRUPT;
|
|
|
|