Skip to content

Commit 694160f

Browse files
committed
Enable option_simple_close feature by default
.. although behind a `cfg` gate for now
1 parent 262abf8 commit 694160f

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ check-cfg = [
6767
"cfg(require_route_graph_test)",
6868
"cfg(splicing)",
6969
"cfg(async_payments)",
70+
"cfg(simple_close)",
7071
]

ci/ci-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,6 @@ RUSTFLAGS="--cfg=splicing" cargo test --verbose --color always -p lightning
155155
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
156156
RUSTFLAGS="--cfg=async_payments" cargo test --verbose --color always -p lightning
157157
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
158+
RUSTFLAGS="--cfg=simple_close" cargo test --verbose --color always -p lightning
159+
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
158160
RUSTFLAGS="--cfg=lsps1_service" cargo test --verbose --color always -p lightning-liquidity

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13379,7 +13379,7 @@ pub(crate) fn provided_channel_type_features(config: &UserConfig) -> ChannelType
1337913379
/// [`ChannelManager`].
1338013380
pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1338113381
// Note that if new features are added here which other peers may (eventually) require, we
13382-
// should also add the corresponding (optional) bit to the [`ChannelMessageHandler`] impl for
13382+
// should also add the corresponding (optional) bit to the [`BaseMessageHandler`] impl for
1338313383
// [`ErroringMessageHandler`].
1338413384
let mut features = InitFeatures::empty();
1338513385
features.set_data_loss_protect_required();
@@ -13395,6 +13395,8 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1339513395
features.set_zero_conf_optional();
1339613396
features.set_route_blinding_optional();
1339713397
features.set_provide_storage_optional();
13398+
#[cfg(simple_close)]
13399+
features.set_simple_close_optional();
1339813400
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
1339913401
features.set_anchors_zero_fee_htlc_tx_optional();
1340013402
}

lightning/src/ln/peer_handler.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ impl BaseMessageHandler for ErroringMessageHandler {
271271
features.set_scid_privacy_optional();
272272
features.set_zero_conf_optional();
273273
features.set_route_blinding_optional();
274+
#[cfg(simple_close)]
275+
features.set_simple_close_optional();
274276
features
275277
}
276278

0 commit comments

Comments
 (0)