| 2367 | } |
| 2368 | |
| 2369 | void 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 | |
| 2383 | bool DescriptorScriptPubKeyMan::CanUpdateToWalletDescriptor(const WalletDescriptor& descriptor, std::string& error) |
| 2384 | { |
no test coverage detected