From 0c9293907f0452d6e186c0e61d6eb02ee461b213 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 fcf25c4e6148..fded161ecfe2 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);