| 1551 | } |
| 1552 | |
| 1553 | bool DescriptorScriptPubKeyMan::GetDescriptorString(std::string& out, const bool priv) const |
| 1554 | { |
| 1555 | LOCK(cs_desc_man); |
| 1556 | |
| 1557 | FlatSigningProvider provider; |
| 1558 | provider.keys = GetKeys(); |
| 1559 | |
| 1560 | if (priv) { |
| 1561 | // For the private version, always return the master key to avoid |
| 1562 | // exposing child private keys. The risk implications of exposing child |
| 1563 | // private keys together with the parent xpub may be non-obvious for users. |
| 1564 | return m_wallet_descriptor.descriptor->ToPrivateString(provider, out); |
| 1565 | } |
| 1566 | |
| 1567 | return m_wallet_descriptor.descriptor->ToNormalizedString(provider, out, &m_wallet_descriptor.cache); |
| 1568 | } |
| 1569 | |
| 1570 | void DescriptorScriptPubKeyMan::UpgradeDescriptorCache() |
| 1571 | { |
no test coverage detected