From f3b6c9bad19dc1fa08e4c4385e93f123d2159622 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 31 Jan 2020 15:24:32 +0100 Subject: [PATCH] plugin: Add featurebits registered by plugins to node_announcements This is the last venue we need to add custom featurebits to, so we also unmark the test as xfail. --- lightningd/gossip_control.c | 9 +++++++-- tests/test_plugin.py | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 67be0db43ebd..46461e39437a 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -191,7 +191,7 @@ static void gossip_topology_synced(struct chain_topology *topo, void *unused) * message */ void gossip_init(struct lightningd *ld, int connectd_fd) { - u8 *msg; + u8 *msg, *node_featurebits; int hsmfd; hsmfd = hsm_get_global_fd(ld, HSM_CAP_SIGN_GOSSIP); @@ -206,11 +206,16 @@ void gossip_init(struct lightningd *ld, int connectd_fd) topology_add_sync_waiter(ld->gossip, ld->topology, gossip_topology_synced, NULL); + node_featurebits = + featurebits_or(tmpctx, take(get_offered_nodefeatures(tmpctx)), + take(plugins_collect_featurebits( + tmpctx, ld->plugins, PLUGIN_FEATURES_NODE))); + msg = towire_gossipctl_init( tmpctx, chainparams, &ld->id, - get_offered_nodefeatures(tmpctx), + node_featurebits, ld->rgb, ld->alias, ld->announcable, diff --git a/tests/test_plugin.py b/tests/test_plugin.py index c5aa8da5c499..6edff7d2222e 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -792,7 +792,6 @@ def test_rpc_command_hook(node_factory): l1.rpc.plugin_stop('rpc_command.py') -@pytest.mark.xfail(strict=True) @unittest.skipIf(not DEVELOPER, "needs LIGHTNINGD_DEV_LOG_IO") def test_plugin_feature_announce(node_factory): """Check that features registered by plugins show up in messages.