Replace boost::variant with std::variant
[novacoin.git] / src / keystore.h
index 438752f..4a1ce85 100644 (file)
@@ -8,7 +8,8 @@
 #include "crypter.h"
 #include "sync.h"
 #include <boost/signals2/signal.hpp>
-#include <boost/variant.hpp>
+
+#include <variant>
 
 class CScript;
 
@@ -25,7 +26,7 @@ public:
   *
   * A CTxDestination is the internal data type encoded in a CBitcoinAddress.
   */
-typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
+using CTxDestination = std::variant<CNoDestination, CKeyID, CScriptID>;
 
 /** A virtual base class for key stores */
 class CKeyStore
@@ -132,7 +133,6 @@ public:
             KeyMap::const_iterator mi = mapKeys.find(address);
             if (mi != mapKeys.end())
             {
-                keyOut.Reset();
                 keyOut.SetSecret((*mi).second.first, (*mi).second.second);
                 return true;
             }
@@ -336,6 +336,12 @@ public:
         return false;
     }
 
+    bool CheckOwnership(const CMalleablePubKey &mpk)
+    {
+        CMalleableKeyView view;
+        return GetMalleableView(mpk, view);
+    }
+
     bool CreatePrivKey(const CPubKey &pubKeyVariant, const CPubKey &R, CKey &privKey) const;
 
     void ListMalleableViews(std::list<CMalleableKeyView> &malleableViewList) const