| 2321 | } |
| 2322 | |
| 2323 | bool DescriptorScriptPubKeyMan::GetDescriptorString(std::string& out, const bool priv) const |
| 2324 | { |
| 2325 | LOCK(cs_desc_man); |
| 2326 | |
| 2327 | FlatSigningProvider provider; |
| 2328 | provider.keys = GetKeys(); |
| 2329 | |
| 2330 | if (priv) { |
| 2331 | // For the private version, always return the master key to avoid |
| 2332 | // exposing child private keys. The risk implications of exposing child |
| 2333 | // private keys together with the parent xpub may be non-obvious for users. |
| 2334 | return m_wallet_descriptor.descriptor->ToPrivateString(provider, out); |
| 2335 | } |
| 2336 | |
| 2337 | return m_wallet_descriptor.descriptor->ToNormalizedString(provider, out, &m_wallet_descriptor.cache); |
| 2338 | } |
| 2339 | |
| 2340 | void DescriptorScriptPubKeyMan::UpgradeDescriptorCache() |
| 2341 | { |
no test coverage detected