Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | bool WalletBatch::WriteKey(const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, | ||||
return WriteIC( | return WriteIC( | ||||
std::make_pair(std::string("key"), vchPubKey), | std::make_pair(std::string("key"), vchPubKey), | ||||
std::make_pair(vchPrivKey, Hash(vchKey.begin(), vchKey.end())), false); | std::make_pair(vchPrivKey, Hash(vchKey.begin(), vchKey.end())), false); | ||||
} | } | ||||
bool WalletBatch::WriteCryptedKey(const CPubKey &vchPubKey, | bool WalletBatch::WriteCryptedKey(const CPubKey &vchPubKey, | ||||
const std::vector<uint8_t> &vchCryptedSecret, | const std::vector<uint8_t> &vchCryptedSecret, | ||||
const CKeyMetadata &keyMeta) { | const CKeyMetadata &keyMeta) { | ||||
if (!WriteIC(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta)) { | if (!WriteIC(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta)) { | ||||
return false; | return false; | ||||
} | } | ||||
if (!WriteIC(std::make_pair(std::string("ckey"), vchPubKey), | if (!WriteIC(std::make_pair(std::string("ckey"), vchPubKey), | ||||
vchCryptedSecret, false)) { | vchCryptedSecret, false)) { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 799 Lines • Show Last 20 Lines |