MCPcopy Create free account
hub / github.com/ElementsProject/elements / WriteDescriptorKey

Method WriteDescriptorKey

src/wallet/walletdb.cpp:221–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221bool WalletBatch::WriteDescriptorKey(const uint256& desc_id, const CPubKey& pubkey, const CPrivKey& privkey)
222{
223 // hash pubkey/privkey to accelerate wallet load
224 std::vector<unsigned char> key;
225 key.reserve(pubkey.size() + privkey.size());
226 key.insert(key.end(), pubkey.begin(), pubkey.end());
227 key.insert(key.end(), privkey.begin(), privkey.end());
228
229 return WriteIC(std::make_pair(DBKeys::WALLETDESCRIPTORKEY, std::make_pair(desc_id, pubkey)), std::make_pair(privkey, Hash(key)), false);
230}
231
232bool WalletBatch::WriteCryptedDescriptorKey(const uint256& desc_id, const CPubKey& pubkey, const std::vector<unsigned char>& secret)
233{

Callers 1

Calls 6

HashFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected