df-tests: test_plugin_feature_announce

This commit is contained in:
niftynei
2020-12-14 18:05:12 -06:00
committed by Christian Decker
parent 21b9bec93b
commit db65771f38

View File

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