Skip to content

Commit

Permalink
plugin: Add featurebits registered by plugins to node_announcements
Browse files Browse the repository at this point in the history
This is the last venue we need to add custom featurebits to, so we also unmark
the test as xfail.
  • Loading branch information
cdecker committed Jan 31, 2020
1 parent 2f57694 commit f3b6c9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lightningd/gossip_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f3b6c9b

Please sign in to comment.