core-lightning/gossipd/tor.h
Rusty Russell 11db7ca9e6 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>
2018-05-10 02:28:44 +00:00

18 lines
430 B
C

#ifndef LIGHTNING_GOSSIPD_TOR_H
#define LIGHTNING_GOSSIPD_TOR_H
#include "config.h"
#include <stdbool.h>
struct wireaddr;
struct io_conn;
struct reaching;
bool do_we_use_tor_addr(const struct wireaddr *wireaddrs);
struct io_plan *io_tor_connect(struct io_conn *conn,
const struct wireaddr *tor_proxyaddr,
const struct wireaddr *addr,
struct reaching *reach);
#endif /* LIGHTNING_GOSSIPD_TOR_H */