mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
wallet: Add GetDescriptorString to DescriptorScriptPubKeyMan
GetDescriptorString returns a normalized descriptor for a DescriptorScriptPubKeyMan.
This commit is contained in:
parent
9be1437c49
commit
bbe4a36152
2 changed files with 15 additions and 0 deletions
|
|
@ -2254,3 +2254,16 @@ const std::vector<CScript> DescriptorScriptPubKeyMan::GetScriptPubKeys() const
|
|||
}
|
||||
return script_pub_keys;
|
||||
}
|
||||
|
||||
bool DescriptorScriptPubKeyMan::GetDescriptorString(std::string& out, bool priv) const
|
||||
{
|
||||
LOCK(cs_desc_man);
|
||||
if (m_storage.IsLocked()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FlatSigningProvider provider;
|
||||
provider.keys = GetKeys();
|
||||
|
||||
return m_wallet_descriptor.descriptor->ToNormalizedString(provider, out, priv);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue