From ade85d4dddfa3256e671ad9f26c155d57e9c582b Mon Sep 17 00:00:00 2001 From: Alex Myers Date: Tue, 10 Oct 2023 14:15:19 -0500 Subject: [PATCH] topology: begin deprecation of private channels in listchannels result Changelog-changed: Note: private channels will be deprecated from listchannels in 24.08 --- plugins/topology.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/topology.c b/plugins/topology.c index 8e42779a7a6b..7dddfa1aa166 100644 --- a/plugins/topology.c +++ b/plugins/topology.c @@ -22,6 +22,8 @@ static struct gossmap *global_gossmap; static struct node_id local_id; static struct plugin *plugin; +extern bool deprecated_apis; + /* We load this on demand, since we can start before gossipd. */ static struct gossmap *get_gossmap(void) { @@ -440,6 +442,10 @@ static void json_add_halfchan(struct json_stream *response, struct amount_sat capacity; bool local_disable; + /* FIXME: deprecate private channels in listchannels result in 24.08 */ + if (deprecated_apis) + return; + /* These are channel (not per-direction) properties */ chanfeatures = gossmap_chan_get_features(tmpctx, gossmap, c); scid = gossmap_chan_scid(gossmap, c);