plugins: add feature_set to init object.

Shows what features we use in various contexts, including those added
by plugins in getmanifest.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Plugin: `feature_set` object added to `init`
This commit is contained in:
Rusty Russell
2020-04-02 14:35:47 +10:30
parent cf43e44378
commit 7a95e90ee4
3 changed files with 37 additions and 0 deletions

View File

@@ -1153,3 +1153,14 @@ def test_hook_crash(node_factory, executor, bitcoind):
# Collect the results:
[f.result(TIMEOUT) for f in futures]
def test_feature_set(node_factory):
plugin = os.path.join(os.path.dirname(__file__), 'plugins/show_feature_set.py')
l1 = node_factory.get_node(options={"plugin": plugin})
fs = l1.rpc.call('getfeatureset')
assert fs['init'] == expected_features()
assert fs['node'] == expected_features()
assert fs['channel'] == ''
assert 'invoice' in fs