CONFIG += thread
CONFIG += static
+#QMAKE_CC=clang
+#QMAKE_CXX=clang++
+
freebsd-g++: QMAKE_TARGET.arch = $$QMAKE_HOST.arch
linux-g++: QMAKE_TARGET.arch = $$QMAKE_HOST.arch
linux-g++-32: QMAKE_TARGET.arch = i686
if (fSuccess)
{
- fSuccess = pwalletMain->AddMalleableKey(mKey);
+ fSuccess = pwalletMain->AddKey(mKey);
result.push_back(Pair("Successful", fSuccess));
result.push_back(Pair("Address", CBitcoinAddress(mKey.GetMalleablePubKey()).ToString()));
result.push_back(Pair("KeyView", CMalleableKeyView(mKey).ToString()));
if (!nTimeFirstKey || nCreationTime < nTimeFirstKey)
nTimeFirstKey = nCreationTime;
- if (!AddMalleableKey(mKey))
- throw std::runtime_error("CWallet::GenerateNewMalleableKey() : AddMalleableKey failed");
+ if (!AddKey(mKey))
+ throw std::runtime_error("CWallet::GenerateNewMalleableKey() : AddKey failed");
return CMalleableKeyView(mKey);
}
return true;
}
-bool CWallet::AddMalleableKey(const CMalleableKey& mKey)
+bool CWallet::AddKey(const CMalleableKey& mKey)
{
CMalleableKeyView keyView = CMalleableKeyView(mKey);
CSecret vchSecretH = mKey.GetSecretH();
CMalleableKeyView GenerateNewMalleableKey();
// Adds a key to the store, and saves it to disk.
bool AddKey(const CKey& key);
- bool AddMalleableKey(const CMalleableKey& mKey);
+ bool AddKey(const CMalleableKey& mKey);
// Adds a key to the store, without saving it to disk (used by LoadWallet)
bool LoadKey(const CKey& key) { return CCryptoKeyStore::AddKey(key); }
// Load metadata (used by LoadWallet)
bool LoadKeyMetadata(const CMalleableKeyView &keyView, const CKeyMetadata &metadata);
// Load malleable key without saving it to disk (used by LoadWallet)
- bool LoadMalleableKey(const CMalleableKeyView &keyView, const CSecret &vchSecretH) { return CCryptoKeyStore::AddMalleableKey(keyView, vchSecretH); }
- bool LoadCryptedMalleableKey(const CMalleableKeyView &keyView, const std::vector<unsigned char> &vchCryptedSecretH) { return CCryptoKeyStore::AddCryptedMalleableKey(keyView, vchCryptedSecretH); }
+ bool LoadKey(const CMalleableKeyView &keyView, const CSecret &vchSecretH) { return CCryptoKeyStore::AddMalleableKey(keyView, vchSecretH); }
+ bool LoadCryptedKey(const CMalleableKeyView &keyView, const std::vector<unsigned char> &vchCryptedSecretH) { return CCryptoKeyStore::AddCryptedMalleableKey(keyView, vchCryptedSecretH); }
bool LoadMinVersion(int nVersion) { nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; }
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;
}
}
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;
}
}
}
printf("Importing %s...\n", addr.ToString().c_str());
- if (!pwallet->AddMalleableKey(mKey)) {
+ if (!pwallet->AddKey(mKey)) {
fGood = false;
continue;
}