Skip to content

Commit 688b0fa

Browse files
committed
lightningd: option_shutdown_anysegwit is no longer experimental.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
1 parent 1e1a74f commit 688b0fa

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

common/features.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,10 @@ static const struct feature_style feature_styles[] = {
8686
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
8787
[BOLT11_FEATURE] = FEATURE_REPRESENT,
8888
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT} },
89-
#if EXPERIMENTAL_FEATURES
9089
{ OPT_SHUTDOWN_ANYSEGWIT,
9190
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
9291
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
9392
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
94-
#endif
9593
};
9694

9795
struct dependency {

lightningd/lightningd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,10 +802,10 @@ static struct feature_set *default_features(const tal_t *ctx)
802802
OPTIONAL_FEATURE(OPT_BASIC_MPP),
803803
OPTIONAL_FEATURE(OPT_GOSSIP_QUERIES_EX),
804804
OPTIONAL_FEATURE(OPT_STATIC_REMOTEKEY),
805+
OPTIONAL_FEATURE(OPT_SHUTDOWN_ANYSEGWIT),
805806
#if EXPERIMENTAL_FEATURES
806807
OPTIONAL_FEATURE(OPT_ANCHOR_OUTPUTS),
807808
OPTIONAL_FEATURE(OPT_ONION_MESSAGES),
808-
OPTIONAL_FEATURE(OPT_SHUTDOWN_ANYSEGWIT),
809809
#endif
810810
};
811811

tests/test_closing.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from utils import (
77
only_one, sync_blockheight, wait_for, TIMEOUT,
88
account_balance, first_channel_id, basic_fee, TEST_NETWORK,
9-
EXPERIMENTAL_FEATURES, scriptpubkey_addr
9+
scriptpubkey_addr
1010
)
1111

1212
import os
@@ -2659,15 +2659,8 @@ def test_segwit_shutdown_script(node_factory, bitcoind, executor):
26592659
else:
26602660
valid = edge_valid + other_valid
26612661

2662-
if EXPERIMENTAL_FEATURES:
2663-
xsuccess = valid
2664-
xfail = invalid
2665-
else:
2666-
xsuccess = []
2667-
xfail = valid + invalid
2668-
26692662
# More efficient to create them all up-front.
2670-
nodes = node_factory.get_nodes(len(xfail) + len(xsuccess))
2663+
nodes = node_factory.get_nodes(len(valid) + len(invalid))
26712664

26722665
# Give it one UTXO to spend for each node.
26732666
addresses = {}
@@ -2680,7 +2673,7 @@ def test_segwit_shutdown_script(node_factory, bitcoind, executor):
26802673
# FIXME: Since we don't support other non-v0 encodings, we need a protocol
26812674
# test for this (we're actually testing our upfront check, not the real
26822675
# shutdown one!),
2683-
for script in xsuccess:
2676+
for script in valid:
26842677
# Insist on upfront script we're not going to match.
26852678
l1.stop()
26862679
l1.daemon.env["DEV_OPENINGD_UPFRONT_SHUTDOWN_SCRIPT"] = script
@@ -2690,7 +2683,7 @@ def test_segwit_shutdown_script(node_factory, bitcoind, executor):
26902683
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
26912684
l1.rpc.fundchannel(l2.info['id'], 10**6)
26922685

2693-
for script in xfail:
2686+
for script in invalid:
26942687
# Insist on upfront script we're not going to match.
26952688
l1.stop()
26962689
l1.daemon.env["DEV_OPENINGD_UPFRONT_SHUTDOWN_SCRIPT"] = script

tests/test_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1892,10 +1892,10 @@ def test_list_features_only(node_factory):
18921892
'option_static_remotekey/odd',
18931893
'option_payment_secret/odd',
18941894
'option_basic_mpp/odd',
1895+
'option_shutdown_anysegwit/odd',
18951896
]
18961897
if EXPERIMENTAL_FEATURES:
18971898
expected += ['option_anchor_outputs/odd']
1898-
expected += ['option_shutdown_anysegwit/odd']
18991899
expected += ['option_onion_messages/odd']
19001900
assert features == expected
19011901

tests/utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ def hex_bits(features):
2020

2121
def expected_peer_features(wumbo_channels=False, extra=[]):
2222
"""Return the expected peer features hexstring for this configuration"""
23-
features = [1, 5, 7, 9, 11, 13, 15, 17]
23+
features = [1, 5, 7, 9, 11, 13, 15, 17, 27]
2424
if EXPERIMENTAL_FEATURES:
2525
# OPT_ONION_MESSAGES
2626
features += [103]
2727
# option_anchor_outputs
2828
features += [21]
29-
# option_shutdown_anysegwit
30-
features += [27]
3129
if wumbo_channels:
3230
features += [19]
3331
if EXPERIMENTAL_DUAL_FUND:
@@ -42,14 +40,12 @@ def expected_peer_features(wumbo_channels=False, extra=[]):
4240
# features for the 'node' and the 'peer' feature sets
4341
def expected_node_features(wumbo_channels=False, extra=[]):
4442
"""Return the expected node features hexstring for this configuration"""
45-
features = [1, 5, 7, 9, 11, 13, 15, 17, 55]
43+
features = [1, 5, 7, 9, 11, 13, 15, 17, 27, 55]
4644
if EXPERIMENTAL_FEATURES:
4745
# OPT_ONION_MESSAGES
4846
features += [103]
4947
# option_anchor_outputs
5048
features += [21]
51-
# option_shutdown_anysegwit
52-
features += [27]
5349
if wumbo_channels:
5450
features += [19]
5551
if EXPERIMENTAL_DUAL_FUND:

0 commit comments

Comments
 (0)