mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
a1bdaa8f99
connectd is the only user of the cryptomsg async APIs; better to open-code it here. We need to expose a little from cryptomsg(), but we remove the 'struct peer' entirely from connectd. One trick is that we still need to defer telling lightningd when a peer reconnects (until it tells us the old one is disconnected). So now we generate the message for lightningd and send it once we're woken. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
19 lines
536 B
C
19 lines
536 B
C
#ifndef LIGHTNING_CONNECTD_PEER_EXCHANGE_INITMSG_H
|
|
#define LIGHTNING_CONNECTD_PEER_EXCHANGE_INITMSG_H
|
|
#include "config.h"
|
|
|
|
struct crypto_state;
|
|
struct daemon;
|
|
struct io_conn;
|
|
struct pubkey;
|
|
struct wireaddr_internal;
|
|
|
|
/* If successful, calls peer_connected() */
|
|
struct io_plan *peer_exchange_initmsg(struct io_conn *conn,
|
|
struct daemon *daemon,
|
|
const struct crypto_state *cs,
|
|
const struct pubkey *id,
|
|
const struct wireaddr_internal *addr);
|
|
|
|
#endif /* LIGHTNING_CONNECTD_PEER_EXCHANGE_INITMSG_H */
|