rgb-cln/lightningd
Rusty Russell 67aa95c194 gossipd: hand back peer, don't hand a new peer.
All peers come from gossipd, and maintain an fd to talk to it.  Sometimes
we hand the peer back, but to avoid a race, we always recreated it.

The race was that a daemon closed the gossip_fd, which made gossipd
forget the peer, then master handed the peer back to gossipd.  We stop
the race by never closing the gossipfd, but hand it back to gossipd
for closing.

Now gossipd has to accept two fds, but the handling of peers is far
clearer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-17 02:44:20 +00:00
..
test bolt11: handle r value fee spec change. 2017-12-12 11:45:44 +01:00
.gitignore handshaked: remove. 2017-10-20 18:31:32 +02:00
Makefile hsm: Cleanup after merging control and client libraries 2017-12-03 17:06:13 +01:00
bitcoind.c bitcoind: don't leak memory on every call to bitcoin-cli. 2017-12-13 22:46:10 +01:00
bitcoind.h feerate: use u32 everywhere. 2017-11-23 12:40:32 +01:00
build_utxos.c common: absorb remaining files from daemon/ 2017-08-29 17:54:14 +02:00
build_utxos.h common: move some files out of lightningd/ 2017-08-29 17:54:14 +02:00
chaintopology.c topology: Add transaction filtering to connect_block 2017-11-29 14:39:12 +01:00
chaintopology.h Fix typos 2017-12-08 13:07:20 +01:00
dev_ping.c subd: automatically detect if callback frees subd. 2017-10-20 18:31:32 +02:00
gossip_control.c gossipd: hand back peer, don't hand a new peer. 2017-12-17 02:44:20 +00:00
gossip_control.h gossipd: rewrite to do the handshake internally. 2017-10-20 18:31:32 +02:00
gossip_msg.c ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
gossip_msg.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
hsm_control.c hsm: Cleanup after merging control and client libraries 2017-12-03 17:06:13 +01:00
hsm_control.h lightningd/hsm_control: use a simple fd for HSM. 2017-06-27 10:25:53 +09:30
htlc_end.c lightningd: instead of malformed code, keep generic error code. 2017-12-02 12:54:12 +01:00
htlc_end.h channeld: generate error messages instead of having master do it. 2017-12-02 12:54:12 +01:00
invoice.c bolt11: handle r value fee spec change. 2017-12-12 11:45:44 +01:00
invoice.h invoice: record expiry in data structure. 2017-11-23 00:11:04 +01:00
jsonrpc.c Fix typos 2017-12-08 13:07:20 +01:00
jsonrpc.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
lightningd.c topology: Add transaction filtering to connect_block 2017-11-29 14:39:12 +01:00
lightningd.h opts: Change alias to be u8*, better matches the unicode nature 2017-12-17 02:44:20 +00:00
log.c Fix typos 2017-12-08 13:07:20 +01:00
log.h dev: option not to do backtracing. 2017-10-31 04:14:33 +00:00
netaddress.c type_to_string: format wireaddr. 2017-10-26 21:01:09 +00:00
netaddress.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
opt_time.c common: absorb remaining files from daemon/ 2017-08-29 17:54:14 +02:00
opt_time.h headers: fix up header idempotent lines. 2017-08-29 17:54:14 +02:00
options.c opts: Change alias to be u8*, better matches the unicode nature 2017-12-17 02:44:20 +00:00
options.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
pay.c lightningd: instead of malformed code, keep generic error code. 2017-12-02 12:54:12 +01:00
pay.h lightningd: unify pay vs forward path when handling failures. 2017-06-23 09:29:42 +09:30
peer_control.c gossipd: hand back peer, don't hand a new peer. 2017-12-17 02:44:20 +00:00
peer_control.h gossipd: hand back peer, don't hand a new peer. 2017-12-17 02:44:20 +00:00
peer_htlcs.c channeld: generate error messages instead of having master do it. 2017-12-02 12:54:12 +01:00
peer_htlcs.h htlc: Defer saving the outgoing payment until we store the HTLC 2017-11-23 23:45:28 +00:00
peer_state.h gossipd: rewrite to do the handshake internally. 2017-10-20 18:31:32 +02:00
subd.c subd: if a required daemon exits, wait instead of killing it. 2017-12-17 02:44:20 +00:00
subd.h subd: wrap all message callbacks in a transaction. 2017-11-06 10:24:34 +01:00
txfilter.c fixup! txfilter: Add a simple transaction filter 2017-11-29 14:39:12 +01:00
txfilter.h fixup! txfilter: Add a simple transaction filter 2017-11-29 14:39:12 +01:00
watch.c watch: remove peer_debug helper. 2017-09-28 13:07:05 +09:30
watch.h lightningd: remove lightningd_state. 2017-08-29 17:54:14 +02:00