Skip to content

Commit

Permalink
connectd: disable advertizement of WEBSOCKET addresses.
Browse files Browse the repository at this point in the history
This seems to prevent broad propagation, due to LND not allowing it.  See
	lightningnetwork/lnd#6432

We still announce it if you disable deprecated-apis, so tests still work,
and hopefully we can enable it in future.

Fixes: ElementsProject#5196
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Apr 19, 2022
1 parent 43f3e70 commit 077a54a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Note: You should always set `allow-deprecated-apis=false` to test for changes.
- Fixed `experimental-websocket-port` to work with default addresses. ([#4945])
- Protocol: removed support for v0.10.1 onion messages. ([#4921])
- Protocol: Ability to announce DNS addresses ([#4829])

- Protocol: disabled websocket announcement due to LND propagation issues.


[#4829]: https://github.com/ElementsProject/lightning/pull/4829
Expand Down
13 changes: 9 additions & 4 deletions connectd/connectd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (!deprecated_apis) {
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"
Expand Down

0 comments on commit 077a54a

Please sign in to comment.