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

Method GetDescriptorString

src/wallet/scriptpubkeyman.cpp:2323–2338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2321}
2322
2323bool 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
2340void DescriptorScriptPubKeyMan::UpgradeDescriptorCache()
2341{

Callers 2

getaddressinfoFunction · 0.80
listdescriptorsFunction · 0.80

Calls 2

ToPrivateStringMethod · 0.45
ToNormalizedStringMethod · 0.45

Tested by

no test coverage detected