mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Implement GetID for DescriptorScriptPubKeyMan
This commit is contained in:
parent
ec2f9e1178
commit
46c46aebb7
1 changed files with 5 additions and 1 deletions
|
|
@ -1621,7 +1621,11 @@ const CKeyMetadata* DescriptorScriptPubKeyMan::GetMetadata(const CTxDestination&
|
||||||
|
|
||||||
uint256 DescriptorScriptPubKeyMan::GetID() const
|
uint256 DescriptorScriptPubKeyMan::GetID() const
|
||||||
{
|
{
|
||||||
return uint256();
|
LOCK(cs_desc_man);
|
||||||
|
std::string desc_str = m_wallet_descriptor.descriptor->ToString();
|
||||||
|
uint256 id;
|
||||||
|
CSHA256().Write((unsigned char*)desc_str.data(), desc_str.size()).Finalize(id.begin());
|
||||||
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DescriptorScriptPubKeyMan::SetType(OutputType type, bool internal)
|
void DescriptorScriptPubKeyMan::SetType(OutputType type, bool internal)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue