mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Create a tr() descriptor bech32m DescriptorScriptPubKeyMan by default
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user