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."
This commit is contained in:
Sangbida Chaudhuri
2025-10-24 13:57:48 +10:30
committed by Rusty Russell
parent 9754603dbe
commit 185ab3d0dc
4 changed files with 1 additions and 6 deletions

View File

@@ -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();

View File

@@ -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,

View File

@@ -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();
}

View File

@@ -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;