mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
lightningd: option_shutdown_anysegwit is no longer experimental.
https://github.com/lightningnetwork/lightning-rfc/pull/672 was merged. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
This commit is contained in:
parent
6753b95470
commit
b6223eb117
5 changed files with 9 additions and 20 deletions
|
@ -86,12 +86,10 @@ static const struct feature_style feature_styles[] = {
|
|||
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
|
||||
[BOLT11_FEATURE] = FEATURE_REPRESENT,
|
||||
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT} },
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
{ OPT_SHUTDOWN_ANYSEGWIT,
|
||||
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
|
||||
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
|
||||
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
|
||||
#endif
|
||||
};
|
||||
|
||||
struct dependency {
|
||||
|
|
|
@ -802,10 +802,10 @@ static struct feature_set *default_features(const tal_t *ctx)
|
|||
OPTIONAL_FEATURE(OPT_BASIC_MPP),
|
||||
OPTIONAL_FEATURE(OPT_GOSSIP_QUERIES_EX),
|
||||
OPTIONAL_FEATURE(OPT_STATIC_REMOTEKEY),
|
||||
OPTIONAL_FEATURE(OPT_SHUTDOWN_ANYSEGWIT),
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
OPTIONAL_FEATURE(OPT_ANCHOR_OUTPUTS),
|
||||
OPTIONAL_FEATURE(OPT_ONION_MESSAGES),
|
||||
OPTIONAL_FEATURE(OPT_SHUTDOWN_ANYSEGWIT),
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ from pyln.testing.utils import SLOW_MACHINE
|
|||
from utils import (
|
||||
only_one, sync_blockheight, wait_for, TIMEOUT,
|
||||
account_balance, first_channel_id, basic_fee, TEST_NETWORK,
|
||||
EXPERIMENTAL_FEATURES, scriptpubkey_addr
|
||||
scriptpubkey_addr
|
||||
)
|
||||
|
||||
import os
|
||||
|
@ -2659,15 +2659,8 @@ Try a range of future segwit versions as shutdown scripts. We create many nodes
|
|||
else:
|
||||
valid = edge_valid + other_valid
|
||||
|
||||
if EXPERIMENTAL_FEATURES:
|
||||
xsuccess = valid
|
||||
xfail = invalid
|
||||
else:
|
||||
xsuccess = []
|
||||
xfail = valid + invalid
|
||||
|
||||
# More efficient to create them all up-front.
|
||||
nodes = node_factory.get_nodes(len(xfail) + len(xsuccess))
|
||||
nodes = node_factory.get_nodes(len(valid) + len(invalid))
|
||||
|
||||
# Give it one UTXO to spend for each node.
|
||||
addresses = {}
|
||||
|
@ -2680,7 +2673,7 @@ Try a range of future segwit versions as shutdown scripts. We create many nodes
|
|||
# FIXME: Since we don't support other non-v0 encodings, we need a protocol
|
||||
# test for this (we're actually testing our upfront check, not the real
|
||||
# shutdown one!),
|
||||
for script in xsuccess:
|
||||
for script in valid:
|
||||
# Insist on upfront script we're not going to match.
|
||||
l1.stop()
|
||||
l1.daemon.env["DEV_OPENINGD_UPFRONT_SHUTDOWN_SCRIPT"] = script
|
||||
|
@ -2690,7 +2683,7 @@ Try a range of future segwit versions as shutdown scripts. We create many nodes
|
|||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.rpc.fundchannel(l2.info['id'], 10**6)
|
||||
|
||||
for script in xfail:
|
||||
for script in invalid:
|
||||
# Insist on upfront script we're not going to match.
|
||||
l1.stop()
|
||||
l1.daemon.env["DEV_OPENINGD_UPFRONT_SHUTDOWN_SCRIPT"] = script
|
||||
|
|
|
@ -1898,6 +1898,8 @@ def test_list_features_only(node_factory):
|
|||
expected += ['option_anchor_outputs/odd']
|
||||
expected += ['option_shutdown_anysegwit/odd']
|
||||
expected += ['option_onion_messages/odd']
|
||||
else:
|
||||
expected += ['option_shutdown_anysegwit/odd']
|
||||
assert features == expected
|
||||
|
||||
|
||||
|
|
|
@ -20,14 +20,12 @@ def hex_bits(features):
|
|||
|
||||
def expected_peer_features(wumbo_channels=False, extra=[]):
|
||||
"""Return the expected peer features hexstring for this configuration"""
|
||||
features = [1, 5, 7, 9, 11, 13, 15, 17]
|
||||
features = [1, 5, 7, 9, 11, 13, 15, 17, 27]
|
||||
if EXPERIMENTAL_FEATURES:
|
||||
# OPT_ONION_MESSAGES
|
||||
features += [103]
|
||||
# option_anchor_outputs
|
||||
features += [21]
|
||||
# option_shutdown_anysegwit
|
||||
features += [27]
|
||||
if wumbo_channels:
|
||||
features += [19]
|
||||
if EXPERIMENTAL_DUAL_FUND:
|
||||
|
@ -42,14 +40,12 @@ def expected_peer_features(wumbo_channels=False, extra=[]):
|
|||
# features for the 'node' and the 'peer' feature sets
|
||||
def expected_node_features(wumbo_channels=False, extra=[]):
|
||||
"""Return the expected node features hexstring for this configuration"""
|
||||
features = [1, 5, 7, 9, 11, 13, 15, 17, 55]
|
||||
features = [1, 5, 7, 9, 11, 13, 15, 17, 27, 55]
|
||||
if EXPERIMENTAL_FEATURES:
|
||||
# OPT_ONION_MESSAGES
|
||||
features += [103]
|
||||
# option_anchor_outputs
|
||||
features += [21]
|
||||
# option_shutdown_anysegwit
|
||||
features += [27]
|
||||
if wumbo_channels:
|
||||
features += [19]
|
||||
if EXPERIMENTAL_DUAL_FUND:
|
||||
|
|
Loading…
Add table
Reference in a new issue