MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / AddCryptedKey

Method AddCryptedKey

src/wallet/wallet.cpp:121–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121bool CWallet::AddCryptedKey(const CPubKey &vchPubKey,
122 const vector<unsigned char> &vchCryptedSecret)
123{
124 if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret))
125 return false;
126 if (!fFileBacked)
127 return true;
128 {
129 LOCK(cs_wallet);
130 if (pwalletdbEncryption)
131 return pwalletdbEncryption->WriteCryptedKey(vchPubKey,
132 vchCryptedSecret,
133 mapKeyMetadata[vchPubKey.GetID()]);
134 else
135 return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey,
136 vchCryptedSecret,
137 mapKeyMetadata[vchPubKey.GetID()]);
138 }
139 return false;
140}
141
142bool CWallet::LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &meta)
143{

Callers

nothing calls this directly

Calls 3

CWalletDBClass · 0.85
WriteCryptedKeyMethod · 0.80
GetIDMethod · 0.80

Tested by

no test coverage detected