aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/key.h')
-rw-r--r--src/key.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/key.h b/src/key.h
index c28222a9a1..f7bdc87c77 100644
--- a/src/key.h
+++ b/src/key.h
@@ -307,6 +307,18 @@ public:
return false;
return true;
}
+
+ bool IsValid()
+ {
+ if (!fSet)
+ return false;
+
+ bool fCompr;
+ CSecret secret = GetSecret(fCompr);
+ CKey key2;
+ key2.SetSecret(secret, fCompr);
+ return GetPubKey() == key2.GetPubKey();
+ }
};
#endif