mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-05 23:24:21 +01:00
options: use NULL for unset Tor settings.
Rename tor_proxyaddrs and tor_serviceaddrs to tor_proxyaddr and tor_serviceaddr: the 's' at the end suggests that there can be more than one. Make them NULL or non-NULL, rather than using all-zero if unset. Hand them the same way to gossipd; it's a bit of a hack since we don't have optional fields, so we use a counter which is always 0 or 1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -173,8 +173,8 @@ void tor_init(struct lightningd *ld)
|
||||
return;
|
||||
|
||||
/* FIXME: Need better way to convert wireaddr to addrinfo... */
|
||||
if (getaddrinfo(fmt_wireaddr_without_port(ld, ld->tor_serviceaddrs),
|
||||
tal_fmt(tmpctx, "%d", ld->tor_serviceaddrs->port), NULL,
|
||||
if (getaddrinfo(fmt_wireaddr_without_port(ld, ld->tor_serviceaddr),
|
||||
tal_fmt(tmpctx, "%d", ld->tor_serviceaddr->port), NULL,
|
||||
&ai_tor) != 0)
|
||||
errx(1, "getaddrinfo failed for Tor service");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user