Skip to content

Commit 0fcc0f9

Browse files
committed
Define and signal the staging zero reserve feature
1 parent 38769e3 commit 0fcc0f9

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

lightning-types/src/features.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ mod sealed {
175175
,
176176
// Byte 19
177177
HtlcHold,
178+
// Byte 20
179+
ZeroReserveStaging,
178180
]
179181
);
180182
define_context!(
@@ -204,8 +206,10 @@ mod sealed {
204206
,
205207
// Byte 19
206208
HtlcHold,
207-
// Byte 20 - 31
208-
,,,,,,,,,,,,
209+
// Byte 20
210+
ZeroReserveStaging,
211+
// Byte 21 - 31
212+
,,,,,,,,,,,
209213
// Byte 32
210214
DnsResolver,
211215
]
@@ -721,6 +725,17 @@ mod sealed {
721725
supports_htlc_hold,
722726
requires_htlc_hold
723727
);
728+
define_feature!(
729+
165,
730+
ZeroReserveStaging,
731+
[InitContext, NodeContext],
732+
"Feature flags for zero reserve.",
733+
set_zero_reserve_optional,
734+
set_zero_reserve_required,
735+
clear_zero_reserve,
736+
supports_zero_reserve,
737+
requires_zero_reserve
738+
);
724739
define_feature!(
725740
259,
726741
DnsResolver,

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17017,6 +17017,7 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1701717017
features.set_simple_close_optional();
1701817018
features.set_quiescence_optional();
1701917019
features.set_splicing_optional();
17020+
features.set_zero_reserve_optional();
1702017021

1702117022
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
1702217023
features.set_anchors_zero_fee_htlc_tx_optional();

lightning/src/ln/peer_handler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ impl BaseMessageHandler for ErroringMessageHandler {
413413
features.set_scid_privacy_optional();
414414
features.set_zero_conf_optional();
415415
features.set_route_blinding_optional();
416+
features.set_zero_reserve_optional();
416417
#[cfg(simple_close)]
417418
features.set_simple_close_optional();
418419
features

0 commit comments

Comments
 (0)