Skip to content

Commit 4babb0f

Browse files
committed
fixup! ld: Enable anchor outputs on liquid and liquid-regtest
1 parent f2f5605 commit 4babb0f

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

tests/test_connection.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,17 +3570,11 @@ def test_wumbo_channels(node_factory, bitcoind):
35703570
@pytest.mark.openchannel('v2')
35713571
@pytest.mark.parametrize("anchors", [False, True])
35723572
def test_channel_features(node_factory, bitcoind, anchors):
3573-
if TEST_NETWORK == 'regtest':
3574-
if anchors is False:
3575-
opts = {'dev-force-features': "-23"}
3576-
else:
3577-
opts = {}
3573+
if anchors is False:
3574+
opts = {'dev-force-features': "-23"}
35783575
else:
3579-
# We have to force this ON for elements!
3580-
if anchors is False:
3581-
opts = {}
3582-
else:
3583-
opts = {'dev-force-features': "+23"}
3576+
opts = {}
3577+
35843578
l1, l2 = node_factory.line_graph(2, fundchannel=False, opts=opts)
35853579

35863580
bitcoind.rpc.sendtoaddress(l1.rpc.newaddr()['bech32'], 0.1)

tests/test_opening.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,10 +1641,10 @@ def test_zeroconf_open(bitcoind, node_factory):
16411641
# and use their own mindepth=6, while l3 uses mindepth=2 from the
16421642
# plugin
16431643
ret = l2.rpc.fundchannel(l3.info['id'], 'all', mindepth=0)
1644-
if TEST_NETWORK == 'regtest':
1645-
channel_type = {'bits': [12, 22, 50], 'names': ['static_remotekey/even', 'anchors/even', 'zeroconf/even']}
1646-
else:
1647-
channel_type = {'bits': [12, 50], 'names': ['static_remotekey/even', 'zeroconf/even']}
1644+
channel_type = {
1645+
'bits': [12, 22, 50],
1646+
'names': ['static_remotekey/even', 'anchors/even', 'zeroconf/even']
1647+
}
16481648
assert ret['channel_type'] == channel_type
16491649
assert only_one(l2.rpc.listpeerchannels(l3.info['id'])['channels'])['channel_type'] == channel_type
16501650

@@ -1723,7 +1723,7 @@ def test_zeroconf_public(bitcoind, node_factory, chainparams):
17231723
assert('short_channel_id' not in l2chan)
17241724

17251725
# Channel is "proposed"
1726-
chan_val = 993888000 if chainparams['elements'] else 970073000
1726+
chan_val = 966908000 if chainparams['elements'] else 970073000
17271727
l1_mvts = [
17281728
{'type': 'chain_mvt', 'credit_msat': chan_val, 'debit_msat': 0, 'tags': ['channel_proposed', 'opener']},
17291729
{'type': 'channel_mvt', 'credit_msat': 0, 'debit_msat': 20000000, 'tags': ['pushed'], 'fees_msat': '0msat'},

tests/utils.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,25 @@ def hex_bits(features):
4141

4242
def expected_peer_features(extra=[]):
4343
"""Return the expected peer features hexstring for this configuration"""
44-
features = [0, 5, 7, 8, 11, 12, 14, 17, 19, 25, 27, 35, 39, 45, 47, 51]
44+
features = [0, 5, 7, 8, 11, 12, 14, 17, 19, 23, 25, 27, 35, 39, 45, 47, 51]
4545
if EXPERIMENTAL_DUAL_FUND:
4646
# option_dual_fund
4747
features += [29]
4848
if EXPERIMENTAL_SPLICING:
4949
features += [63] # option_splice
50-
if TEST_NETWORK != 'liquid-regtest':
51-
# Anchors, except for elements
52-
features += [23]
5350
return hex_bits(features + extra)
5451

5552

5653
# With the addition of the keysend plugin, we now send a different set of
5754
# features for the 'node' and the 'peer' feature sets
5855
def expected_node_features(extra=[]):
5956
"""Return the expected node features hexstring for this configuration"""
60-
features = [0, 5, 7, 8, 11, 12, 14, 17, 19, 25, 27, 35, 39, 45, 47, 51, 55]
57+
features = [0, 5, 7, 8, 11, 12, 14, 17, 19, 23, 25, 27, 35, 39, 45, 47, 51, 55]
6158
if EXPERIMENTAL_DUAL_FUND:
6259
# option_dual_fund
6360
features += [29]
6461
if EXPERIMENTAL_SPLICING:
6562
features += [63] # option_splice
66-
if TEST_NETWORK != 'liquid-regtest':
67-
# Anchors, except for elements
68-
features += [23]
6963
return hex_bits(features + extra)
7064

7165

0 commit comments

Comments
 (0)