mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
a3c4908f4a
Connectd already does this when we *receive* an error or warning, but now do it on send. This causes some slight behavior change: we don't disconnect when we close a channel, for example (our behaviour here has been inconsistent across versions, depending on the code). When connectd is told to disconnect, it now does so immediately, and doesn't wait for subds to drain etc. That simplifies the manual disconnect case, which now cleans up as it would from any other disconnection when connectd says it's disconnected. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
28 lines
864 B
C
28 lines
864 B
C
#ifndef LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
#define LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
#include <ccan/tal/tal.h>
|
|
|
|
struct lightningd;
|
|
struct peer;
|
|
struct pubkey;
|
|
struct wireaddr_internal;
|
|
|
|
/* Returns fd for gossipd to talk to connectd */
|
|
int connectd_init(struct lightningd *ld);
|
|
void connectd_activate(struct lightningd *ld);
|
|
|
|
void try_reconnect(const tal_t *ctx,
|
|
struct peer *peer,
|
|
u32 seconds_delay,
|
|
const struct wireaddr_internal *addrhint);
|
|
void connect_succeeded(struct lightningd *ld, const struct peer *peer,
|
|
bool incoming,
|
|
const struct wireaddr_internal *addr);
|
|
void connect_failed_disconnect(struct lightningd *ld,
|
|
const struct node_id *id,
|
|
const struct wireaddr_internal *addr);
|
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H */
|