Skip to content

Commit ceef61d

Browse files
committed
gossip: Pass use_dns option down to gossipd
Signed-off-by: Christian Decker <[email protected]>
1 parent 1bfa02d commit ceef61d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

gossipd/gossip.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ struct daemon {
170170
bool use_proxy_always;
171171
char *tor_password;
172172

173+
/* @see lightningd.config.use_dns */
174+
bool use_dns;
173175
};
174176

175177
/* Peers we're trying to reach. */
@@ -2836,7 +2838,7 @@ static struct io_plan *gossip_init(struct daemon_conn *master,
28362838
&daemon->proposed_listen_announce, daemon->rgb,
28372839
daemon->alias, &update_channel_interval, &daemon->reconnect,
28382840
&proxyaddr, &daemon->use_proxy_always,
2839-
&dev_allow_localhost,
2841+
&dev_allow_localhost, &daemon->use_dns,
28402842
&daemon->tor_password)) {
28412843
master_badmsg(WIRE_GOSSIPCTL_INIT, msg);
28422844
}

gossipd/gossip_wire.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ gossipctl_init,,num_tor_proxyaddrs,u16
2323
gossipctl_init,,tor_proxyaddr,num_tor_proxyaddrs*struct wireaddr
2424
gossipctl_init,,use_tor_proxy_always,bool
2525
gossipctl_init,,dev_allow_localhost,bool
26+
gossipctl_init,,use_dns,bool
2627
gossipctl_init,,tor_password,wirestring
2728

2829
# Activate the gossip daemon, so others can connect.

lightningd/gossip_control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ void gossip_init(struct lightningd *ld)
246246
listen_announce, ld->rgb,
247247
ld->alias, ld->config.channel_update_interval, ld->reconnect,
248248
ld->proxyaddr, ld->use_proxy_always || ld->pure_tor_setup,
249-
allow_localhost,
249+
allow_localhost, ld->config.use_dns,
250250
ld->tor_service_password ? ld->tor_service_password : "");
251251
subd_send_msg(ld->gossip, msg);
252252
}

0 commit comments

Comments
 (0)