dual-fund: remove anchor assumption for all dual-funded channels

Only add the anchor channel_type if it's negotiated separately!
This commit is contained in:
niftynei
2022-10-19 13:35:45 -05:00
committed by Rusty Russell
parent efe66f9689
commit c9c367d770
10 changed files with 88 additions and 56 deletions

View File

@@ -1606,15 +1606,10 @@ def test_plugin_feature_announce(node_factory):
wait_for_announce=True
)
extra = []
if l1.config('experimental-dual-fund'):
extra.append(21) # option-anchor-outputs
extra.append(29) # option-dual-fund
# Check the featurebits we've set in the `init` message from
# feature-test.py.
assert l1.daemon.is_in_log(r'\[OUT\] 001000022100....{}'
.format(expected_peer_features(extra=[201] + extra)))
.format(expected_peer_features(extra=[201])))
# Check the invoice featurebit we set in feature-test.py
inv = l1.rpc.invoice(123, 'lbl', 'desc')['bolt11']
@@ -1623,7 +1618,7 @@ def test_plugin_feature_announce(node_factory):
# Check the featurebit set in the `node_announcement`
node = l1.rpc.listnodes(l1.info['id'])['nodes'][0]
assert node['features'] == expected_node_features(extra=[203] + extra)
assert node['features'] == expected_node_features(extra=[203])
def test_hook_chaining(node_factory):