Skip to content

Commit 953aa81

Browse files
committed
Add option_dual_fund feature
1 parent 8942f46 commit 953aa81

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11343,6 +11343,7 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1134311343
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
1134411344
features.set_anchors_zero_fee_htlc_tx_optional();
1134511345
}
11346+
features.set_dual_fund_optional();
1134611347
features
1134711348
}
1134811349

lightning/src/ln/features.rs

Lines changed: 8 additions & 2 deletions
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
@@ -150,7 +153,7 @@ mod sealed {
150153
// Byte 2
151154
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx,
152155
// Byte 3
153-
RouteBlinding | ShutdownAnySegwit | Taproot,
156+
RouteBlinding | ShutdownAnySegwit | DualFund | Taproot,
154157
// Byte 4
155158
OnionMessages,
156159
// Byte 5
@@ -168,7 +171,7 @@ mod sealed {
168171
// Byte 2
169172
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx,
170173
// Byte 3
171-
RouteBlinding | ShutdownAnySegwit | Taproot,
174+
RouteBlinding | ShutdownAnySegwit | DualFund | Taproot,
172175
// Byte 4
173176
OnionMessages,
174177
// Byte 5
@@ -410,6 +413,9 @@ mod sealed {
410413
define_feature!(27, ShutdownAnySegwit, [InitContext, NodeContext],
411414
"Feature flags for `opt_shutdown_anysegwit`.", set_shutdown_any_segwit_optional,
412415
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit);
416+
define_feature!(29, DualFund, [InitContext, NodeContext],
417+
"Feature flags for `option_dual_fund`.", set_dual_fund_optional, set_dual_fund_required,
418+
supports_dual_fund, requires_dual_fund);
413419
define_feature!(31, Taproot, [InitContext, NodeContext, ChannelTypeContext],
414420
"Feature flags for `option_taproot`.", set_taproot_optional,
415421
set_taproot_required, supports_taproot, requires_taproot);

lightning/src/ln/peer_handler.rs

Lines changed: 1 addition & 0 deletions
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)