verify vchPubKey matches calculated public key unless fSkipCheck is set

This commit is contained in:
patrick s 2013-08-29 01:11:47 -07:00
parent 6e51b3bddf
commit a42eef6f10

View File

@ -421,6 +421,12 @@ bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
fCompressed = vchPubKey.IsCompressed();
fValid = true;
if (fSkipCheck)
return true;
if (GetPubKey() != vchPubKey)
return false;
return true;
}