diff options
| author | Andrew Chow <[email protected]> | 2019-07-08 17:28:17 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2020-04-23 13:59:48 -0400 |
| commit | 46c46aebb7943e1e2e96755e94dc6c197920bf75 (patch) | |
| tree | ef3f8806f36cf99f22ae20b28ee0309e10bf6b72 /src/wallet/scriptpubkeyman.cpp | |
| parent | Implement IsHDEnabled in DescriptorScriptPubKeyMan (diff) | |
| download | discoin-46c46aebb7943e1e2e96755e94dc6c197920bf75.tar.xz discoin-46c46aebb7943e1e2e96755e94dc6c197920bf75.zip | |
Implement GetID for DescriptorScriptPubKeyMan
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
| -rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index c28b7fcfa..a6978d4aa 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -1621,7 +1621,11 @@ const CKeyMetadata* DescriptorScriptPubKeyMan::GetMetadata(const CTxDestination& 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) |