Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 413 Lines • ▼ Show 20 Lines | |||||
void CWallet::LoadScriptMetadata(const CScriptID &script_id, | void CWallet::LoadScriptMetadata(const CScriptID &script_id, | ||||
const CKeyMetadata &meta) { | const CKeyMetadata &meta) { | ||||
// m_script_metadata | // m_script_metadata | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
UpdateTimeFirstKey(meta.nCreateTime); | UpdateTimeFirstKey(meta.nCreateTime); | ||||
m_script_metadata[script_id] = meta; | m_script_metadata[script_id] = meta; | ||||
} | } | ||||
// Writes a keymetadata for a public key. overwrite specifies whether to | |||||
// overwrite an existing metadata for that key if there exists one. | |||||
bool CWallet::WriteKeyMetadata(const CKeyMetadata &meta, const CPubKey &pubkey, | |||||
const bool overwrite) { | |||||
return WalletBatch(*database).WriteKeyMetadata(meta, pubkey, overwrite); | |||||
} | |||||
bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, | bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, | ||||
const std::vector<uint8_t> &vchCryptedSecret) { | const std::vector<uint8_t> &vchCryptedSecret) { | ||||
return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); | return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); | ||||
} | } | ||||
/** | /** | ||||
* Update wallet first key creation time. This should be called whenever keys | * Update wallet first key creation time. This should be called whenever keys | ||||
* are added to the wallet, with the oldest key creation time. | * are added to the wallet, with the oldest key creation time. | ||||
▲ Show 20 Lines • Show All 4,496 Lines • Show Last 20 Lines |