diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-01-26 19:26:34 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-01-26 19:26:43 +0100 |
commit | 91f43a33f8fb9d87bd2b6a7a279e4a6f5c1e3c96 (patch) | |
tree | 70cc726b22b1dab4948485ded3a6f59b13529438 /src/key.h | |
parent | 4c932cca6f579bfb11e0144415c3004d382b8e42 (diff) |
Full checking of all loaded keys
Diffstat (limited to 'src/key.h')
-rw-r--r-- | src/key.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |