diff --git a/src/key.cpp b/src/key.cpp index 0377140f7..fe5222378 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -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; }