Pull request #21: windows fixes/cleanup by Matoking
[novacoin.git] / src / keystore.cpp
index 5bf919c..68f57e7 100644 (file)
@@ -33,6 +33,19 @@ bool CBasicKeyStore::AddKey(const CKey& key)
     return true;
 }
 
+bool CCryptoKeyStore::SetCrypted()
+{
+    CRITICAL_BLOCK(cs_KeyStore)
+    {
+        if (fUseCrypto)
+            return true;
+        if (!mapKeys.empty())
+            return false;
+        fUseCrypto = true;
+    }
+    return true;
+}
+
 std::vector<unsigned char> CCryptoKeyStore::GenerateNewKey()
 {
     RandAddSeedPerfmon();