It's a c++: use string.clear()
[novacoin.git] / src / walletdb.cpp
index e44885d..cd90f97 100644 (file)
@@ -85,7 +85,7 @@ void CWalletDB::ListAccountCreditDebit(const string& strAccount, list<CAccountin
     if (!pcursor)
         throw runtime_error("CWalletDB::ListAccountCreditDebit() : cannot create DB cursor");
     unsigned int fFlags = DB_SET_RANGE;
-    while (true)
+    for ( ; ; )
     {
         // Read next record
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
@@ -311,9 +311,9 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
             ssValue >> vchSecret;
 
             CMalleableKeyView keyView(strKeyView);
-            if (!pwallet->LoadMalleableKey(keyView, vchSecret))
+            if (!pwallet->LoadKey(keyView, vchSecret))
             {
-                strErr = "Error reading wallet database: LoadMalleableKey failed";
+                strErr = "Error reading wallet database: LoadKey failed";
                 return false;
             }
         }
@@ -326,9 +326,9 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
             ssValue >> vchCryptedSecret;
 
             CMalleableKeyView keyView(strKeyView);
-            if (!pwallet->LoadCryptedMalleableKey(keyView, vchCryptedSecret))
+            if (!pwallet->LoadCryptedKey(keyView, vchCryptedSecret))
             {
-                strErr = "Error reading wallet database: LoadCryptedMalleableKey failed";
+                strErr = "Error reading wallet database: LoadCryptedKey failed";
                 return false;
             }
         }
@@ -525,7 +525,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
             return DB_CORRUPT;
         }
 
-        while (true)
+        for ( ; ; )
         {
             // Read next record
             CDataStream ssKey(SER_DISK, CLIENT_VERSION);
@@ -625,7 +625,7 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash)
             return DB_CORRUPT;
         }
 
-        while (true)
+        for ( ; ; )
         {
             // Read next record
             CDataStream ssKey(SER_DISK, CLIENT_VERSION);
@@ -940,7 +940,7 @@ bool ImportWallet(CWallet *pwallet, const string& strLocation)
            }
 
            printf("Importing %s...\n", addr.ToString().c_str());
-           if (!pwallet->AddMalleableKey(mKey)) {
+           if (!pwallet->AddKey(mKey)) {
                fGood = false;
                continue;
            }