MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / WriteDescriptorKey

Method WriteDescriptorKey

src/wallet/walletdb.cpp:217–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217bool WalletBatch::WriteDescriptorKey(const uint256& desc_id, const CPubKey& pubkey, const CPrivKey& privkey)
218{
219 // hash pubkey/privkey to accelerate wallet load
220 const auto keypair_hash = Hash(pubkey, privkey);
221
222 return WriteIC(std::make_pair(DBKeys::WALLETDESCRIPTORKEY, std::make_pair(desc_id, pubkey)), std::make_pair(privkey, keypair_hash), false);
223}
224
225bool WalletBatch::WriteCryptedDescriptorKey(const uint256& desc_id, const CPubKey& pubkey, const std::vector<unsigned char>& secret)
226{

Callers 1

Calls 1

HashFunction · 0.50

Tested by

no test coverage detected