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

Method AddDescriptorKey

src/wallet/scriptpubkeyman.cpp:1902–1909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1900}
1901
1902void DescriptorScriptPubKeyMan::AddDescriptorKey(const CKey& key, const CPubKey &pubkey)
1903{
1904 LOCK(cs_desc_man);
1905 WalletBatch batch(m_storage.GetDatabase());
1906 if (!AddDescriptorKeyWithDB(batch, key, pubkey)) {
1907 throw std::runtime_error(std::string(__func__) + ": writing descriptor private key failed");
1908 }
1909}
1910
1911bool DescriptorScriptPubKeyMan::AddDescriptorKeyWithDB(WalletBatch& batch, const CKey& key, const CPubKey &pubkey)
1912{

Callers 1

AddWalletDescriptorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected