Skip to content

Commit e099cba

Browse files
committed
Define option_dual_fund feature
The `option_dual_fund` feature uses the bit pair 28/29 and should be present in the Init and Node contexts.
1 parent e404c12 commit e099cba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lightning/src/ln/features.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message) for more information).
4444
//! - `ShutdownAnySegwit` - requires/supports that future segwit versions are allowed in `shutdown`
4545
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
46+
//! - `DualFund` - requires/supports V2 channel establishment which allows both peers to contribute
47+
//! funds to a new channel (see [BOLT-2](https://github.com/lightning/bolts/pull/851/files) for more information).
48+
// TODO(dual_fund): Update link
4649
//! - `OnionMessages` - requires/supports forwarding onion messages
4750
//! (see [BOLT-7](https://github.com/lightning/bolts/pull/759/files) for more information).
4851
// TODO: update link
@@ -143,7 +146,7 @@ mod sealed {
143146
// Byte 2
144147
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx,
145148
// Byte 3
146-
ShutdownAnySegwit,
149+
ShutdownAnySegwit | DualFund,
147150
// Byte 4
148151
OnionMessages,
149152
// Byte 5
@@ -159,7 +162,7 @@ mod sealed {
159162
// Byte 2
160163
BasicMPP | Wumbo | AnchorsNonzeroFeeHtlcTx | AnchorsZeroFeeHtlcTx,
161164
// Byte 3
162-
ShutdownAnySegwit,
165+
ShutdownAnySegwit | DualFund,
163166
// Byte 4
164167
OnionMessages,
165168
// Byte 5
@@ -394,6 +397,9 @@ mod sealed {
394397
define_feature!(27, ShutdownAnySegwit, [InitContext, NodeContext],
395398
"Feature flags for `opt_shutdown_anysegwit`.", set_shutdown_any_segwit_optional,
396399
set_shutdown_any_segwit_required, supports_shutdown_anysegwit, requires_shutdown_anysegwit);
400+
define_feature!(29, DualFund, [InitContext, NodeContext],
401+
"Feature flags for `option_dual_fund`.", set_dual_fund_optional, set_dual_fund_required,
402+
supports_dual_fund, requires_dual_fund);
397403
define_feature!(39, OnionMessages, [InitContext, NodeContext],
398404
"Feature flags for `option_onion_messages`.", set_onion_messages_optional,
399405
set_onion_messages_required, supports_onion_messages, requires_onion_messages);

0 commit comments

Comments
 (0)