mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-22 22:44:25 +01:00
connectd: disable advertizement of WEBSOCKET addresses.
This seems to prevent broad propagation, due to LND not allowing it. See https://github.com/lightningnetwork/lnd/issues/6432 We still announce it if you disable deprecated-apis, so tests still work, and hopefully we can enable it in future. Fixes: #5196 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: Protocol: disabled websocket announcement due to LND propagation issues
This commit is contained in:
@@ -1397,10 +1397,15 @@ setup_listeners(const tal_t *ctx,
|
||||
* different type.
|
||||
*/
|
||||
if (tal_count(*announceable) != 0) {
|
||||
wireaddr_from_websocket(&addr.u.wireaddr,
|
||||
daemon->websocket_port);
|
||||
add_announceable(announceable,
|
||||
&addr.u.wireaddr);
|
||||
/* See https://github.com/lightningnetwork/lnd/issues/6432:
|
||||
* if we add websocket to the node_announcement, it doesn't propagate.
|
||||
* So we do not do this for now in general! */
|
||||
if (daemon->announce_websocket) {
|
||||
wireaddr_from_websocket(&addr.u.wireaddr,
|
||||
daemon->websocket_port);
|
||||
add_announceable(announceable,
|
||||
&addr.u.wireaddr);
|
||||
}
|
||||
} else {
|
||||
status_unusual("Bound to websocket %s,"
|
||||
" but we cannot announce"
|
||||
@@ -1535,6 +1540,7 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
|
||||
&daemon->timeout_secs,
|
||||
&daemon->websocket_helper,
|
||||
&daemon->websocket_port,
|
||||
&daemon->announce_websocket,
|
||||
&dev_fast_gossip,
|
||||
&dev_disconnect,
|
||||
&dev_no_ping_timer)) {
|
||||
|
||||
@@ -188,6 +188,9 @@ struct daemon {
|
||||
int gossip_store_fd;
|
||||
size_t gossip_store_end;
|
||||
|
||||
/* We only announce websocket addresses if !deprecated_apis */
|
||||
bool announce_websocket;
|
||||
|
||||
#if DEVELOPER
|
||||
/* Hack to speed up gossip timer */
|
||||
bool dev_fast_gossip;
|
||||
|
||||
@@ -22,6 +22,7 @@ msgdata,connectd_init,use_v3_autotor,bool,
|
||||
msgdata,connectd_init,timeout_secs,u32,
|
||||
msgdata,connectd_init,websocket_helper,wirestring,
|
||||
msgdata,connectd_init,websocket_port,u16,
|
||||
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,
|
||||
|
||||
|
Reference in New Issue
Block a user