core-lightning/connectd
Rusty Russell 30f08cc2b0 connectd: always tell master when connection fails/succeeded.
We used to separate implicit connection requests (ie. timed retries
for important peers) and explicit ones, and send a
WIRE_CONNECTCTL_CONNECT_TO_PEER_RESULT for the latter.

In the success case, that's now redundant, since we hand the connected
peer to the master using WIRE_CONNECT_PEER_CONNECTED; we just need a
message for the failure case.  And we might as well tell the master
every failure, so we don't have to distinguish internally.

This also solves a race we had before: connectd would send
WIRE_CONNECTCTL_CONNECT_TO_PEER_RESULT which completes the incoming
JSON connect command, then send WIRE_CONNECT_PEER_CONNECTED.  So
there's a window where the JSON command can return, but the peer isn't
known to lightningd yet.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-09 19:44:27 +02:00
..
test gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00
connect_gossip_wire.csv gossipd: provide connectd with address resolution. 2018-07-25 02:13:52 +00:00
connect_wire.csv connectd: always tell master when connection fails/succeeded. 2018-08-09 19:44:27 +02:00
connect.c connectd: always tell master when connection fails/succeeded. 2018-08-09 19:44:27 +02:00
connect.h connectd: new daemon to handle connections. 2018-07-25 02:13:52 +00:00
handshake.c gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00
handshake.h gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00
Makefile sync_crypto_write/sync_crypto_read: just fail, don't return NULL. 2018-08-05 02:03:58 +00:00
netaddress.c gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00
netaddress.h gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00
tor_autoservice.c Remove tal_len, use tal_count() or tal_bytelen(). 2018-07-30 11:31:17 +02:00
tor_autoservice.h gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00
tor.c gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00
tor.h gossipd: move files into connectd. 2018-07-25 02:13:52 +00:00