mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Merge bitcoin/bitcoin#22364: wallet: Make a tr() descriptor by default
4868c9f1b3Extract Taproot internal keyid with GetKeyFromDestination (Andrew Chow)d8abbe119cMention bech32m in -addresstype and -changetype help (Andrew Chow)8fb57845eeCreate a tr() descriptor bech32m DescriptorScriptPubKeyMan by default (Andrew Chow)54b3699862Store pubkeys in TRDescriptor::MakeScripts (Andrew Chow) Pull request description: Make a `tr()` descriptor by default in descriptor wallets so that users will be able to make and use segwit v1 bech32m addresses. ACKs for top commit: MarcoFalke: Concept ACK4868c9f1b3Sjors: re-utACK4868c9f1b3gruve-p: ACK4868c9f1b3meshcollider: Concept + code review ACK4868c9f1b3Tree-SHA512: e5896e665b8d559f1d759b6582d1bb24f70d4698a57307684339d9fdcdac28ae9bc17bc946a7efec9cb35c130a95ffc36e3961a335124ec4535d77b8d00e9631
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