connectd: remove unused flag to connect_init.
What changed, and why it matters
This is a small cleanup change that removes an obsolete setting related to announcing websocket addresses. It does not change any security behavior; the feature was already unused.
No security action needed. Treat as routine code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes the announce_websocket boolean field from the connectd_init wire message and from the daemon struct in connectd. The caller in lightningd/connect_control.c previously passed !ld->deprecated_ok, but the field was no longer being used inside connectd. This is a dead-code removal with no functional or security effect.
Changed components
connectdlightningd/connect_control.cconnectd wire protocolInspect captured patch +0 / −6
diff --git a/connectd/connectd.c b/connectd/connectd.c
index 90cbc30c..93fea082 100644
--- a/connectd/connectd.c
+++ b/connectd/connectd.c
@@ -1652,7 +1652,6 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
&tor_password,
&daemon->timeout_secs,
&daemon->websocket_helper,
- &daemon->announce_websocket,
&daemon->dev_fast_gossip,
&dev_disconnect,
&daemon->dev_no_ping_timer,
diff --git a/connectd/connectd.h b/connectd/connectd.h
index 1e78834b..41a86cd1 100644
--- a/connectd/connectd.h
+++ b/connectd/connectd.h
@@ -338,9 +338,6 @@ struct daemon {
u32 gossip_recent_time;
struct gossmap_iter *gossmap_iter_recent;
- /* We only announce websocket addresses if !deprecated_apis */
- bool announce_websocket;
-
/* Shutting down, don't send new stuff */
bool shutting_down;
diff --git a/connectd/connectd_wire.csv b/connectd/connectd_wire.csv
index d3af2709..4b4d5457 100644
--- a/connectd/connectd_wire.csv
+++ b/connectd/connectd_wire.csv
@@ -18,7 +18,6 @@ msgdata,connectd_init,use_dns,bool,
msgdata,connectd_init,tor_password,wirestring,
msgdata,connectd_init,timeout_secs,u32,
msgdata,connectd_init,websocket_helper,wirestring,
-msgdata,connectd_init,announce_websocket,bool,
msgdata,connectd_init,dev_fast_gossip,bool,
# If this is set, then fd 5 is dev_disconnect_fd.
msgdata,connectd_init,dev_disconnect,bool,
diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c
index 611b5ba2..ae0bde7a 100644
--- a/lightningd/connect_control.c
+++ b/lightningd/connect_control.c
@@ -711,7 +711,6 @@ int connectd_init(struct lightningd *ld)
ld->tor_service_password ? ld->tor_service_password : "",
ld->config.connection_timeout_secs,
websocket_helper_path,
- !ld->deprecated_ok,
ld->dev_fast_gossip,
ld->dev_disconnect_fd >= 0,
ld->dev_no_ping_timer,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.