From: Arik Sosman Date: Fri, 21 Jul 2023 19:11:02 +0000 (-0700) Subject: Add Taproot feature support. X-Git-Tag: v0.0.117-alpha1~47^2~3 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=5e6bc761914957454807cf449bf3b9b6cff392aa;p=rust-lightning Add Taproot feature support. Introduce a Taproot feature on bits 30/31 for initialization, node, and channel type contexts. --- diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index 5de383b1f..1992b8db9 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -143,7 +143,7 @@ mod sealed { // Byte 2 BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx, // Byte 3 - ShutdownAnySegwit, + ShutdownAnySegwit | Taproot, // Byte 4 OnionMessages, // Byte 5 @@ -159,7 +159,7 @@ mod sealed { // Byte 2 BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx, // Byte 3 - ShutdownAnySegwit, + ShutdownAnySegwit | Taproot, // Byte 4 OnionMessages, // Byte 5 @@ -205,7 +205,7 @@ mod sealed { // Byte 2 AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx, // Byte 3 - , + Taproot, // Byte 4 , // Byte 5 @@ -394,6 +394,9 @@ mod sealed { define_feature!(27, ShutdownAnySegwit, [InitContext, NodeContext], "Feature flags for `opt_shutdown_anysegwit`.", set_shutdown_any_segwit_optional, set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit); + define_feature!(31, Taproot, [InitContext, NodeContext, ChannelTypeContext], + "Feature flags for `option_taproot`.", set_taproot_optional, + set_taproot_required, supports_taproot, requires_taproot); define_feature!(39, OnionMessages, [InitContext, NodeContext], "Feature flags for `option_onion_messages`.", set_onion_messages_optional, set_onion_messages_required, supports_onion_messages, requires_onion_messages);