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

Method UpdateWalletDescriptor

src/wallet/scriptpubkeyman.cpp:2369–2381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2367}
2368
2369void DescriptorScriptPubKeyMan::UpdateWalletDescriptor(WalletDescriptor& descriptor)
2370{
2371 LOCK(cs_desc_man);
2372 std::string error;
2373 if (!CanUpdateToWalletDescriptor(descriptor, error)) {
2374 throw std::runtime_error(std::string(__func__) + ": " + error);
2375 }
2376
2377 m_map_pubkeys.clear();
2378 m_map_script_pub_keys.clear();
2379 m_max_cached_index = -1;
2380 m_wallet_descriptor = descriptor;
2381}
2382
2383bool DescriptorScriptPubKeyMan::CanUpdateToWalletDescriptor(const WalletDescriptor& descriptor, std::string& error)
2384{

Callers 1

AddWalletDescriptorMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected