aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/key.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/key.cpp b/src/key.cpp
index 0377140f79..fe5222378a 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;
}