Browse Source

verify vchPubKey matches calculated public key unless fSkipCheck is set

0.10
patrick s 11 years ago
parent
commit
a42eef6f10
  1. 6
      src/key.cpp

6
src/key.cpp

@ -421,6 +421,12 @@ bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) { @@ -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;
}

Loading…
Cancel
Save