From 185ab3d0dc1e0dd93655ba34242c593f45c27f8f Mon Sep 17 00:00:00 2001 From: Sangbida Chaudhuri <101164840+sangbida@users.noreply.github.com> Date: Fri, 24 Oct 2025 13:57:48 +1030 Subject: [PATCH] utxo: remove UTXO_P2TR_BIP86 enum and consolidate to UTXO_P2TR This simplifies the UTXO type system by removing the separate BIP86 enum value. P2TR addresses will now use unified derivation logic based on the wallet's HSM secret type rather than having separate enum values." --- bitcoin/tx.c | 1 - bitcoin/tx.h | 2 -- common/utxo.c | 2 -- wallet/wallet.c | 2 +- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/bitcoin/tx.c b/bitcoin/tx.c index e03b98b3e..4c1a63de6 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -940,7 +940,6 @@ size_t bitcoin_tx_input_witness_weight(enum utxotype utxotype) /* In practice, these predate anchors, so: */ return 1 + 1 + bitcoin_tx_input_sig_weight(); case UTXO_P2TR: - case UTXO_P2TR_BIP86: return 1 + 64; } abort(); diff --git a/bitcoin/tx.h b/bitcoin/tx.h index 4690b6fbe..4b7134e0f 100644 --- a/bitcoin/tx.h +++ b/bitcoin/tx.h @@ -53,8 +53,6 @@ enum utxotype { UTXO_P2WSH_FROM_CLOSE = 3, /* "p2tr" addresses. */ UTXO_P2TR = 4, - /* "bip86" addresses (P2TR with BIP86 derivation). */ - UTXO_P2TR_BIP86 = 5, }; struct bitcoin_tx_output *new_tx_output(const tal_t *ctx, diff --git a/common/utxo.c b/common/utxo.c index f94c85aed..ca978c507 100644 --- a/common/utxo.c +++ b/common/utxo.c @@ -46,8 +46,6 @@ const char *utxotype_to_str(enum utxotype utxotype) return "p2wsh_from_close"; case UTXO_P2TR: return "p2tr"; - case UTXO_P2TR_BIP86: - return "p2tr_bip86"; } abort(); } diff --git a/wallet/wallet.c b/wallet/wallet.c index 0e0d5a032..5061798af 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -3260,7 +3260,7 @@ static void got_utxo(struct wallet *w, utxo->utxotype = UTXO_P2TR; goto type_ok; case ADDR_P2TR_MNEMONIC: - utxo->utxotype = UTXO_P2TR_BIP86; + utxo->utxotype = UTXO_P2TR; goto type_ok; case ADDR_ALL: break;