gossipd: take connectd fd on initialization.

connectd has a dedicated fd to gossipd, so it can ask for a new gossip_fd
for a peer.

gossipd has a standalone routine to create a remote peer (this will
eventually be the only way gossipd creates a new peer).

For now lightningd creates a socketpair but doesn't run connectd, so
gossipd never sees any requests on this fd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-24 15:48:58 +09:30
parent e1dfb1b178
commit 92d66a5451
8 changed files with 157 additions and 6 deletions

View File

@@ -5,6 +5,8 @@
struct lightningd;
struct pubkey;
/* Returns fd for gossipd to talk to connectd */
int connectd_init(struct lightningd *ld);
void gossip_connect_result(struct lightningd *ld, const u8 *msg);
#endif /* LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H */