mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
72c459dd6c
1. Lifetime of 'struct reaching' now only while we're actively doing connect. 2. Always free after a single attempt: if it's an important peer, retry on a timer. 3. Have a single response message to master, rather than relying on peer_connected on success and other msgs on failure. 4. If we are actively connecting and we get another command for the same id, just increment the counter The result is much simpler in the master daemon, and much nicer for reconnection: if they say to connect they get an immediate response, rather than waiting for 10 retries. Even if it's an important peer, it fires off another reconnect attempt, unless it's actively connecting now. This removes exponential backoff: that's restored in next patch. It also doesn't handle multiple addresses for a single peer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 lines
269 B
C
11 lines
269 B
C
#ifndef LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
#define LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H
|
|
#include "config.h"
|
|
|
|
struct lightningd;
|
|
struct pubkey;
|
|
|
|
void gossip_connect_result(struct lightningd *ld, const u8 *msg);
|
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_CONNECT_CONTROL_H */
|