diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-06-23 16:11:51 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-11-16 12:20:13 -0500 |
commit | 8fb57845ee3844c9ba854471065109d2e409300f (patch) | |
tree | 941d73885c9006ba6af443199430c39375e98817 /src/wallet/scriptpubkeyman.cpp | |
parent | 54b3699862de687f782c7c52500d6a2372478355 (diff) |
Create a tr() descriptor bech32m DescriptorScriptPubKeyMan by default
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
-rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 9173c790d4..8d6f3b2395 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -1876,12 +1876,6 @@ bool DescriptorScriptPubKeyMan::AddDescriptorKeyWithDB(WalletBatch& batch, const bool DescriptorScriptPubKeyMan::SetupDescriptorGeneration(const CExtKey& master_key, OutputType addr_type, bool internal) { - if (addr_type == OutputType::BECH32M) { - // Don't allow setting up taproot descriptors yet - // TODO: Allow setting up taproot descriptors - return false; - } - LOCK(cs_desc_man); assert(m_storage.IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)); @@ -1911,7 +1905,10 @@ bool DescriptorScriptPubKeyMan::SetupDescriptorGeneration(const CExtKey& master_ desc_prefix = "wpkh(" + xpub + "/84'"; break; } - case OutputType::BECH32M: assert(false); // TODO: Setup taproot descriptor + case OutputType::BECH32M: { + desc_prefix = "tr(" + xpub + "/86'"; + break; + } } // no default case, so the compiler can warn about missing cases assert(!desc_prefix.empty()); |