From 3280704886b60644d103a5eb310691c003a39328 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 1 Mar 2021 14:48:59 -0500 Subject: Pass in DescriptorCache to ToNormalizedString Use the descriptor xpub cache in ToNormalizedString so that the wallet does not need to be unlocked in order to get the normalized descriptor. --- src/wallet/scriptpubkeyman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/scriptpubkeyman.cpp') diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index c0c752cad6..ddb6b05071 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -2276,7 +2276,7 @@ bool DescriptorScriptPubKeyMan::GetDescriptorString(std::string& out) const FlatSigningProvider provider; provider.keys = GetKeys(); - return m_wallet_descriptor.descriptor->ToNormalizedString(provider, out); + return m_wallet_descriptor.descriptor->ToNormalizedString(provider, out, &m_wallet_descriptor.cache); } void DescriptorScriptPubKeyMan::UpgradeDescriptorCache() -- cgit v1.2.3