core-lightning/gossipd/tor.h
Rusty Russell 003cd29733 tor: clean up io_tor_connect.
Instead of storing a wireaddr and converting to an addrinfo every
time, just convert once (which also avoids the memory leak in the
current code).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-10 02:28:44 +00:00

19 lines
447 B
C

#ifndef LIGHTNING_GOSSIPD_TOR_H
#define LIGHTNING_GOSSIPD_TOR_H
#include "config.h"
#include <stdbool.h>
struct addrinfo;
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 addrinfo *tor_proxyaddr,
const struct wireaddr *addr,
struct reaching *reach);
#endif /* LIGHTNING_GOSSIPD_TOR_H */