Skip to content

Commit 7b66c45

Browse files
committed
Add option_dual_fund feature
1 parent 4b8e447 commit 7b66c45

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Diff for: lightning/src/ln/channelmanager.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11421,6 +11421,7 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1142111421
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
1142211422
features.set_anchors_zero_fee_htlc_tx_optional();
1142311423
}
11424+
features.set_dual_fund_optional();
1142411425
features
1142511426
}
1142611427

Diff for: lightning/src/ln/features.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
//! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md#route-blinding) for more information).
5050
//! - `ShutdownAnySegwit` - requires/supports that future segwit versions are allowed in `shutdown`
5151
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
52+
//! - `DualFund` - requires/supports V2 channel establishment
53+
//! (see [BOLT-2](https://github.com/lightning/bolts/pull/851/files) for more information).
54+
// TODO: update link
5255
//! - `OnionMessages` - requires/supports forwarding onion messages
5356
//! (see [BOLT-7](https://github.com/lightning/bolts/pull/759/files) for more information).
5457
// TODO: update link
@@ -149,7 +152,7 @@ mod sealed {
149152
// Byte 2
150153
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx,
151154
// Byte 3
152-
RouteBlinding | ShutdownAnySegwit | Taproot,
155+
RouteBlinding | ShutdownAnySegwit | DualFund | Taproot,
153156
// Byte 4
154157
OnionMessages,
155158
// Byte 5
@@ -167,7 +170,7 @@ mod sealed {
167170
// Byte 2
168171
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx,
169172
// Byte 3
170-
RouteBlinding | ShutdownAnySegwit | Taproot,
173+
RouteBlinding | ShutdownAnySegwit | DualFund | Taproot,
171174
// Byte 4
172175
OnionMessages,
173176
// Byte 5
@@ -409,6 +412,9 @@ mod sealed {
409412
define_feature!(27, ShutdownAnySegwit, [InitContext, NodeContext],
410413
"Feature flags for `opt_shutdown_anysegwit`.", set_shutdown_any_segwit_optional,
411414
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit);
415+
define_feature!(29, DualFund, [InitContext, NodeContext],
416+
"Feature flags for `option_dual_fund`.", set_dual_fund_optional, set_dual_fund_required,
417+
supports_dual_fund, requires_dual_fund);
412418
define_feature!(31, Taproot, [InitContext, NodeContext, ChannelTypeContext],
413419
"Feature flags for `option_taproot`.", set_taproot_optional,
414420
set_taproot_required, supports_taproot, requires_taproot);

Diff for: lightning/src/ln/peer_handler.rs

+1
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ impl ChannelMessageHandler for ErroringMessageHandler {
311311
features.set_basic_mpp_optional();
312312
features.set_wumbo_optional();
313313
features.set_shutdown_any_segwit_optional();
314+
features.set_dual_fund_optional();
314315
features.set_channel_type_optional();
315316
features.set_scid_privacy_optional();
316317
features.set_zero_conf_optional();

0 commit comments

Comments
 (0)